Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use Visual Studio to create, edit, debug and compile a simple C program. Airplan

ID: 3742303 • Letter: U

Question

Use Visual Studio to create, edit, debug and compile a simple C program.

Airplane pilots need to determine how far away from an airport they need to start descending to land. The standard descent rate is 500 feet per minute. Create a program that enables the pilot to enter the speed the airplane is flying in miles per hour and the current altitude in feet. Your program should then calculate how many miles away from the airport the pilot should start the descent. Inputs: 1)The airplane's altitude in feet. 2) The airplane's speed in miles per hour Processing: 1.Determine the number of minutes needed to descend at 500 fpm. 2. Determine the speed of the airplane in miles per minute. 3. Multiply the number of minutes needed by the speed in miles per minute. Output: Display a nicely worded message that indicates how many miles away from the airport the pilot must start the descent.

Explanation / Answer

#include <stdio.h>

int main()
{
int feet,miles;
float mpm,minutes,result;
printf("Please enter airplanes altitude in feet ");
scanf("%d",&feet);

printf("Please enter airplanes speed in miles per hour ");
scanf("%d",&miles);
  
// 1) Number of minutes needed to descend at 500fpm
minutes = feet/500;

//2) Calculating miles per minute from miles per hour
mpm= miles * 0.016666666666667;
  
//3)
result = minutes * mpm;
  
printf("Th pilot must start the descent %f feet away from the airport",result);

return 0;
}