Question: Objective: Working with arrays Write a C program to record the GPAs of a class and find the number of students in eaclh GPA. The

 Objective: Working with arrays Write a C program to record the

Objective: Working with arrays Write a C program to record the GPAs of a class and find the number of students in eaclh GPA. The program first allows the user to enter the number of students enrolled in the class, and then to enter the GPA of all students one by one. For each student, the input must be between 1 and 4 inclusively. Otherwise, the software displays a message as "Invalid number!" and asks for a new GPA for the same student. A sample interaction is shown below: Sample input: Sample Output: Enter the number of students GPA of student #1 is : GPA of student #2 is : Invalid number! GPA of student #2 is : GPA of student #3 is : GPA of student #4 is : GPA of student #5 is : GPA of student #6 is : GPA of student #7 is : GPA of student #8 is : The total number of students is 8 GPA 1 1 student(s) GPA 2 -- 2 student(s) GPA 2 student(s) GPA 4 -- 3 student(s) 2 4 4 4 Note: you should trace the GPA list just once. So, you should use an array int GPAFrea [4] to store the frequencies of each GPA from 1 to 4

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 Databases Questions!