subject

Write a calculator program that keep reading operations and double numbers from user, and print the result based on the chosen operation using while loop. the loop must stop if the user enters q letter.
note: no need to write two classes.
typical run of the program:
enter an operation(+*,/), q to quit: +
enter your first number: 6
enter your second number: 5
result= 11.0
enter an operation(+*,/), q to quit: *
enter your first number: 5
enter your second number: 5
result= 25.0
enter an operation(+*,/), q to quit: q
you calculator has been ended!

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:00, eden1017
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
image
Computers and Technology, 22.06.2019 18:00, ladyree8721
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, carolelai08
Stops: using the information learned in this course, explain three things you will not do when driving. a. b. c. explain why you will not do these things when driving. starts: using the information learned in this course, explain three things you will do when driving. a. b. c. explain why you will do these particular things when driving. explain one thing you will stop doing as a passenger. explain one thing you will start doing as a passenger.
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, Vanesssajohn2962
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
You know the right answer?
Write a calculator program that keep reading operations and double numbers from user, and print the...

Questions in other subjects:

Konu
Mathematics, 19.06.2020 00:57