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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started