Question: Lab 1 : Flight time of an aeroplane ( flight ) You are expected to demonstrate a working C program according to the description below.
"Lab : Flight time of an aeroplane"
flight
You are expected to demonstrate a working C program according to the description below. Your solution should be uploaded via Brightspace before the deadline. You must use the file name specified in the problem description below. Late submissions will not be graded and will receive zero credit, so even if your program is not running correctly, you should submit your "best attempt".
Program description
This program again concerns the aeroplane of Lab a which travels at an average velocity of miles per hour. Write a program flightc which prints out the journey time in hours and minutes for different distances ranging from a lower limit to an upper limit in steps of a fixed size the lower limit the upper limit and the step size are specified by the user
As in Lab a the flight time should be expressed to the nearest minute.
Also, we again use an equivalence of mathrm~km miles.
The program execution should look like the following user input in bold text:
Enter the lower limit on distance in km:
Enter the upper limit on distance in km:
Enter the step size in km:
Hint: To get started, a good idea is to write a program which prints out only the first column of the table. This will require a loop. Then, you can think about modifying the program so that the second and third columns also appear to achieve this, the calculation from Lab la needs to be inserted into the loop
Note: For completeness and for extra credit the program should also check at runtime if the values input by the user will produce a valid output table; if this is not the case, the program should simply output an error message instead of printing the table.
Deliverables
YOUR PROGRAM WILL NOT BE GRADED UNLESS IT HAS THE CORRECT FILENAME
STUDENTS MUST WORK INDEPENDENTLY. PROGRAMS WILL BE EXAMINED FOR EVIDENCE OF COPYING. COPYING OR ALLOWING YOUR WORK TO BE COPIED WILL RESULT IN A GRADE OF NM BEING ALLOCATED FOR THE ASSIGNMENT.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
