Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need a program written in basic C language that can do these conversions! Write a program to convert from English units to metric units, specifically
Need a program written in basic C language that can do these conversions!
Write a program to convert from English units to metric units, specifically to convert: altitude from miles to meters, AND speed from feet per second to kilometers per hour. For your conversions, use the following constant values AND NO OTHERS. declaring and ini- tializing appropriate named constants (you are ABSOLUTELY FORBIDDEN to combine these in initializations): There are 5280 feet per mile. There are 1.609344 kilometers per mile. There are 1000 meters per kilometer. There are 60 minutes per hour. There are 60 seconds per minute The program body MUST incorporate the following subsections, IN THE FOLLOWING ORDER: 1. Greeting Subsection: Greet the user with useful information about the program. 2. Input Subsection (a) Prompt the user for an altitude in miles. (b) Input the altitude in miles. (c) Prompt the user for a speed in feet per second. (d) Input the speed in feet per second. Continue on to the next page.) 3. Calculation Subsection (a) Calculate the altitude in meters. (b) Calculate the speed in kilometers per hour. . Output Subsection (a) Output the altitude in both miles and meters. (b) Output the speed in both feet per second and kilometers per hour. IMPORTANT: Altitudes and speeds AREN'T constrained to be integers. RUNS: Run this program three times using three different sets of input values. The first run MUST use mile and 1000 feet per second as input values. For the other two runs, you may choose APPROPRIATE values to your likingStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started