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 and

 Write a C program that asks the user to enter a

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

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!