Menu

[solved]-Write C Program Prompt User Input Length Inches Two Distances Entered Convert Number Inche Q39077377

Write a c++ program that will prompt a user to inputthe length in inches of two distances. Once entered, convert thenumber of inches of the two distances to feet (include theremaining inches). Output each distance entered, the total of thetwo distances and the conversion in feet / inches.

After outputting the distance in feet and inches, ifthe distance is greater than 3 feet, convert the distance to meters(display the remaining distance in centimeters). If totaldistance is not greater than 3 feet, convert the total inches toinches in miles. Output the title “Metric Conversion of ???inches”, where “???” is the total inches. Format the numbers withone decimal place. Right align the numbers with a column width of10 and left align the labels “m” and “cm”, with a column with of 5.Leaving a space between the number and label (ex: 2.0 m).

NOTE: Prompts must be descriptive. (Ex: Enterlength of first distance in inches:)

Sample output:

     90 in

     22 in

————-

   112 in

 9 ft 3 in

 

Metric Conversionof 112 inches

   2.0 m

 84.4 cm

 

If not greater 3 feet output should look like thefollowing:

32 inches is equalto 0.000505 miles.

Note: Display the statement above that will includethe total inches and the inches in miles using six decimalplaces.

Expert Answer


Answer to Write a c++ program that will prompt a user to input the length in inches of two distances. Once entered, convert the nu… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *