Write a program that uses a structure to store the following
Solution
struct planes
{ int total_landed;
int total_departed;
int greatest_number;
int least_number;
void average_landedcalculate()
{ int sum=0;
int average;
sum= sum+ total_landed;
average=sum/31;
cout<<\"average number planed landed\"<<average;
}
void average_departedcalculate()
{ int sum1=0;
int averaged;
sum1=sum1+ total_departed;
averaged=sum1/31;
cout<<\" the average planes departed\"<<averaged;
}
void calculate_total_in_year(int p,int q)
{ int total;
int totalsum=0;
totalsum+=total_landed+total_departed;
total=totalsum*12;
cout<<\"total number of planes in a year\"<<total;
}
};
void main()
{planes p1;
p1.total_landed=10;
p1.total_departed=12;
p1.average_landedcalculate(); // calculates average number of planes landed
p1.average_departedcalculate();// calculate average number of departed planes
p1.calculate_total_in_year();
}

