Question: Write a program that accepts two real numbers in any order and divides the smaller one into the larger one. Use a single output statement

Write a program that accepts two real numbers in any order and divides the smaller one into the larger one. Use a single output statement that displays as follows:

25.4 divided by 6.9 equals 3.68

Because the user can enter the data in any order, you'll need a single-sided decision with a swap, in case the user enters the smaller value first.

Format the input values as above, with 1 decimal place and the result with two decimal places.

Test the program with the data above, then 3.5 and 27.0, and then 156.8 and 22.2.

Upload your C++ code and a Word Document with screenshots of your output.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!