![Write a C program to record the GPAs of a class and find the percentage of students in each GPA he 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: 8The total number of students is 8. GPA of student #1 is: 1 GPA of student #2 is : Invalid number! GPA of student #2 is :2 GPA of student #3 is : 3 GPA of student #4 is : 4 GPA of student #5 is : 4 GPA of student #6 is : 2 GPA of student #7 is : 3 GPA of student #8 is :4 GPA 1 -1 student(s) GPA 22 student(s) GPA 3 --2 student(s) GPA 4 -- 3 student(s) The percentage of students with GPA (1) is (12%) The percentage of students with GPA (2) is (25%) The percentage of students with GPA (3) is (25%) The percentage of students with GPA (4) is (38%). Note: you should trace the GPA list just once. So, you should use an array int GPAFreq[ 4] to store the frequencies of each GPA from 1 to 4.](http://img.homeworklib.com/questions/d60a49d0-6ca5-11eb-9527-47bd95c54dce.png?x-oss-process=image/resize,w_560)
There was another answer for this question but it was not done correctly. Here is the link to it:
https://www.chegg.com/homework-help/questions-and-answers/objective-working-arrays-write-c-program-record-gpas-class-find-number-students-eaclh-gpa--q29791390
That code only was able to calculate the GPA of exactly 8 students. The question is asking to calculate for n number of students.
C Program:
#include <stdio.h>
int main() {
int n,gpa;
printf("Enter the number of students: ");
scanf("%d",&n);
int GPAFreq[4]={0,0,0,0};
for(int i=0;i<8;i++){
printf("GPA of student #%d: ",(i+1));
scanf("%d",&gpa);
while(gpa<0 || gpa>4)
{
printf("\nInvalid input\n");
printf("GPA of student #%d",(i+1));
scanf(" %d",&gpa);
}
if(gpa==1)
GPAFreq[0]++;
else if(gpa==2)
GPAFreq[1]++;
else if(gpa==3)
GPAFreq[2]++;
else
GPAFreq[3]++;
}
printf("The total number of students is %d",n);
for(int i=0;i<4;i++){
printf("\nGPA %d --- %d Students",(i+1),GPAFreq[i]);
}
}

There was another answer for this question but it was not done correctly. Here is the...
(7) Student grade point statistics [Problem description] There is a need to make statistics of the grade points of the students in the first semester of 2018. It is assumed that there are n (can be set as 6) classes in this grade, and there are 20 students in each class, the total number of courses with exam is m (can be set as 10), and the percentage system is adopted for each course. The gpa is 4, 3, 2,1,...
For Python 3.7+.
TEST THE CODE WITH THE FOLLOWING GLOBAL CODE AFTER
YOU'RE DONE:
print('\nStart of A2 Student class demo ')
s1 = Student('David Miller', major = 'Hist',enrolled = 'y',
credits = 0, qpoints = 0)
s2 = Student('Sonia Fillmore', major = 'Math',enrolled = 'y',
credits = 90, qpoints = 315)
s3 = Student('A. Einstein', major = 'Phys',enrolled = 'y', credits
= 0, qpoints =
0)
s4 = Student('W. A. Mozart', major = 'Mus',enrolled = 'n', credits
= 29, qpoints...
Python: Printing Student Data Ask the user: "How many students are in the class?" Read in the number of students If there are students For each student Ask for the name of the student: "Enter the name of student:" Read in the name of the student If the student's name is greater than 24 characters Do not display this student's data Do not ask for their gpa Print: "Name of student cannot exceed 24 characters." Ask for the gpa of...
Question 1 (24 Marks] 1. (4 marks) Write an immutable Person class in Java which provides the following. • Two attributes: lastName and first Name of type String. • Appropriate initialization, accessors/mutator methods. 2. (6 marks) Write a Student class that is a subclass of Person class (in the previous question) which provides the following. • Two attributes: A unique student ID of type String and GPA of type float; the student ID is initialized when a Student object gets...
Write a C++ program to store and update students' academic records in a binary search tree. Each record (node) in the binary search tree should contain the following information fields: 1) Student name - the key field (string); 2) Credits attempted (integer); 3) Credits earned (integer); 4) Grade point average - GPA (real). All student information is to be read from a text file. Each record in the file represents the grade information on...
You are asked to build and test the following system using Java and the object-oriented concepts you learned in this course: Project (20 marks) CIT College of Information technology has students, faculty, courses and departments. You are asked to create a program to manage all these information's. Create a class CIT to represents the following: Array of Students, each student is represented by class Student. Array of Faculty, each faculty is represented by class Faculty. Array of Course, each course...
The professor suspects that her sample is flawed. She assigns each of the students in the class an ID number from 1 to 62 and uses Excel to select a simple random sample of ID numbers. The professor meets with the students in the sample. Each student signs a release that gives the registrar permission to use the student’s GPA to compute the sample average. The professor assures the students that the registrar will provide her with the average and...
Python : Need help with output of table Code: # Number of students print('How many students are in the class?') student_Number = int(input()) # Store list of students who are valid student_List = [] for i in range(0, student_Number): # To store current student data student_Data = [] print('Enter the name of student:') # Name of Students student_Name = input() if len(student_Name)> 24: print('Name of student cannot exceed 24 characters.') continue print('Enter the gpa of student:') # GPA of Student...
In java please. SumOfPowerOfTwo The following program can be done in a single class. Write a program that requests and reads in a integer number between 1 and 40 inclusively. Repeat the loop until a proper number is entered. Call the method powersOfTwoSum with the number as the actual parameter. Expect a value of type long as a return value. powersOfTwoSum(int number) This method must use a recursive technique to return the sum of the powers of two from the...
In Java Programming: Create a flow chart for a program that prompts for an integer N (number of students) and M (number of test scores for each students), and allows the user to N*M real numbers. The program then calculates the average for each student and class average. (1) Prompt the user to input N students and M test scores, then display the inputs. Enter number of students: You entered: 2 Enter number of test scores: You entered: 3 Enter...