Estimated flight time in minutes Acceptable error margin in minutes
360 or more 17
For example, if an estimated flight time is 106 mins, the acceptable error margin is 4 mins. Thus, the estimated flight time is too large if the actual flight time is less than 102 mins, or the estimated flight time is too large if the actual flight time is greater than 110 mins; otherwise, the estimate is acceptable.
Write a function that uses a switch statement to determine the acceptable error for a given estimated flight time, according to this table. Use the function in a program that reads an estimated flight time and an actual flight time and then determines whether the estimated time is too large, acceptable, or too small. If the estimated flight time is too large or too small, the program should also print the amount of the overestimate or underestimate.