Question: Modify main.c to convert metric lengths (meters, etc.) from arbitrary metric unit to arbitrary metric unit. You should read and answer the questions in the

 Modify main.c to convert metric lengths (meters, etc.) from arbitrary metric
unit to arbitrary metric unit. You should read and answer the questions
in the questions file as well. HINT: Do the input and output

Modify main.c to convert metric lengths (meters, etc.) from arbitrary metric unit to arbitrary metric unit. You should read and answer the questions in the questions file as well. HINT: Do the input and output parts first before starting the conversion part. For example: the user may input 600.3 km to Mm and your program will output: 600.300 km is 0.600 Mm Another Sample input/output: 5000 m to km 5000.000 mis 5.000 km You must support the following metric prefixes OS M - 10^6 k - 1843 . - 1 (Use . if you wish to input just meters, e.g. 5 m, the output should not include the ", just m) d - 10^-1 C 10.2 - 10^-3 29 30 31 You must output your numbers with 3 decimal places. You must define the conversion factors above as constants in your code. Think carefully and design your approach before starting. This can be done in about 1 - 1.5 printed page of code. Jumping in mediately may make your code get huge and lead to extra work. Saveu 1 Before you begin coding, describe your approach to solving the problem by laying out the steps your program will take. 2. What changed in your design during the process of writing the code? (if anything) 3. Did you test every input case? Every conversion between different units? Why or why not? main.c @ saved include #define MEGA 1.0E6 // one million meters in a Megameter. Bodvou WN int main() { // variables definitions 1/Prompt for input printf(" Welcome to the metric length converter: "); printf(" Input Example: 5 km to cm") // Get input F/Do conversion print output return

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!