Question: Create a struct called Classroom that has the components className of type string, averageAge of type double, numberOfStudents, minAge, and ages [ ] an array

Create a struct called Classroom that has the components className of type string, averageAge of type double, numberOfStudents, minAge, and ages [] an array of type integer.
Write the function void input(Classroom &), which reads data in the struct variable.
Write the function void output (Classroom), which prints data in the struct variable.
Write the function void average(Classroom &), which calculates the average of the age.
Write the function void findMin(Classroom &), which finds the minimum age of students
Use the following driver/main:
int main()
{
Classroom c;
input(c);
return 0;
}
Sample Input / Output:
Enter the class name: Programming2
Enter the number of students: 5
Enter the ages of the students:
Age of student 1: 18
Age of student 2: 20
Age of student 3: 21
Age of student 4: 19
Age of student 5: 22
Classroom details:
Class name: Programming2
Number of students: 5
Average age of students: 20
Minimum age of students: 18
Ages of students: 1820211922
#include
using namespace std;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!