102k views
5 votes
Suppose you are tasked with creating a program that uses a structure to store information about airport activity for each month, including total number of planes landed, total number of planes departed, greatest number of planes landed in a day, and least number of planes landed in a day. The program should have an array of twelve structures to hold travel information for the entire year. What should the program do after prompting the user to enter data for each month?

A. Calculate and output the total number of planes landed and departed for the year.

B. Calculate and output the average monthly number of landing planes and departing planes.

C. Determine and output the greatest and least number of planes that landed on any one day, along with the respective months.

D. All of the above.

1 Answer

3 votes

Final answer:

After prompting the user to enter data, the program should store the information in an array of structures and perform various operations based on user requirements.

Step-by-step explanation:

After prompting the user to enter data for each month, the program should store the entered information in an array of twelve structures. Each structure should contain variables to store the total number of planes landed, total number of planes departed, greatest number of planes landed in a day, and least number of planes landed in a day for a particular month.

Once the data is entered and stored, the program can perform various operations based on user requirements. Some possible options include:

  1. Calculating the average number of planes landed and planes departed per month.
  2. Finding the month with the highest number of planes landed or planes departed.
  3. Determining the month with the highest and lowest number of planes landed in a single day.
  4. Displaying a summary of the airport activity for each month.

The specific actions the program should take after prompting the user to enter data for each month will depend on the requirements and objectives of the program.

User Przemyslaw
by
7.4k points