Question: Write a C program that asks the user to enter a distance (assumed to be in metres). Convert this distance to yards, feet, inches
Write a C program that asks the user to enter a distance (assumed to be in metres). Convert this distance to yards, feet, inches and a decimal number, rounded to two decimal places, that indicates any remaining fraction of an inch. Use the conversion factor 1 inch = 2.54 cm. For example, if the user enters a value of 3.376, the output will be: 3 yards, 2 feet, 0 inches, 0.91 inches remainder The prompt to the user should take the form: Please provide a distance in metres: written by itself on a single line.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
