Question #49950

Write a program that can enter marks for number of students and calculate their Total and class

average, with the following format

The inputs:

ID (int), First (double), Second (double) and Final ( double).

The variables:

stNum (int) can be calculated during the while loop;

C_aver (double);

stu_sum ( double) and grade ( Char);

The Grades are: A for 90’s, B for 80’s, C for 70’s, D for 60’s and F for less than 60.

Use while loop to ask if there is more students to enter. Use the switch statement to find the grade.

Use the following functions to find

1. Int Enter_ID(); to enter the student ID number;

2. double Enter_Marks(); to enter the student marks one by one;

3. double student_sum(double first, double second, double final); to find the total sum of the

student marks;

4. double ClassAverage(duble class_total, int stNum); to find the class average;

5. char Grade(double stu_sum); to find the grade using switch statement;

6. void Print(double first, double second, double final, double st_sum, char grade); to print the

student ID and marks

The output:

St_Nm ID First Second Final Average Grade

1 20071156 15.5 16.5 30.1 62.1 D

Class average for 10 students is: 72.5

average, with the following format

The inputs:

ID (int), First (double), Second (double) and Final ( double).

The variables:

stNum (int) can be calculated during the while loop;

C_aver (double);

stu_sum ( double) and grade ( Char);

The Grades are: A for 90’s, B for 80’s, C for 70’s, D for 60’s and F for less than 60.

Use while loop to ask if there is more students to enter. Use the switch statement to find the grade.

Use the following functions to find

1. Int Enter_ID(); to enter the student ID number;

2. double Enter_Marks(); to enter the student marks one by one;

3. double student_sum(double first, double second, double final); to find the total sum of the

student marks;

4. double ClassAverage(duble class_total, int stNum); to find the class average;

5. char Grade(double stu_sum); to find the grade using switch statement;

6. void Print(double first, double second, double final, double st_sum, char grade); to print the

student ID and marks

The output:

St_Nm ID First Second Final Average Grade

1 20071156 15.5 16.5 30.1 62.1 D

Class average for 10 students is: 72.5

Expert's answer

Learn more about our help with Assignments: C++

## Comments

## Leave a comment