Question: Write a program in C which declares variables, prompts the user to input a length in miles, and prints the equivalent value in units of
Write a program in C which declares variables, prompts the user to input a length in miles, and prints the equivalent value in units of kilometers, inches, and centimeters with text identifying each. Use data type double for all values. Use the following conversion formulas:1 ft = 12 in1 in = 2.54 cm1 m = 100 cm1 mi = 5280 ft1 km = 1000 mUsing a complete sentence, output the original number of miles and the equivalent number of kilometers as a decimal with 2 digits following the decimal point.Using a complete sentence on a new line, output the equivalent number of inches in exponential (e) format with 3 digits after the decimal point (when the value is in exponential notation).Again using a complete sentence on a new line, output the equivalent number of centimeters in general (g) format with 6 significant digits.Test with a length of 25.38 miles.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
