Đang Thực Hiện

120897 Grade Calculation program in C

Write a program in C to calculate average test grades for a class. The number of tests per students and the number of students in the class must be variable. That means that your program should accept any number of tests or students (as input data) without any changes in the source code (look at examples below). Other input data will be student names and their test grades. Note that you will have to use nested for loops to solve this problem. Run the program using examples given below, and at least one of your own.

Interactive Session Example:

(prompt - denotes output provided by your program (to distinguish it from user provided data, it should not be printed by your program) :

Example 1 :

-ENTER NUMBER OF STUDENTS IN THE CLASS :

3

-ENTER NUMBER OF TESTS PER STUDENT :

3

-ENTER THE NAME OF STUDENT NUMBER 1 :

BROWN

-ENTER GRADE 1 :

50

-ENTER GRADE 2 :

60

-ENTER GRADE 3 :

70

-

-*******************************************

-* THE FINAL GRADE FOR STUDENT BROWN IS 60 *

-*******************************************

-

-ENTER THE NAME OF STUDENT NUMBER 2 :

JONES

-ENTER GRADE 1 :

70

-ENTER GRADE 2 :

80

-ENTER GRADE 3 :

90

-

-*******************************************

-* THE FINAL GRADE FOR STUDENT JONES IS 80 *

-*******************************************

-

-ENTER THE NAME OF STUDENT NUMBER 3 :

RITT

-ENTER GRADE 1 :

50

-ENTER GRADE 2 :

70

-ENTER GRADE 3 :

90

-

-*******************************************

-* THE FINAL GRADE FOR STUDENT RITT IS 70 *

-*******************************************

-END.

Example 2:

-ENTER NUMBER OF STUDENTS IN THE CLASS :

2

-ENTER NUMBER OF TESTS PER STUDENT :

4

-ENTER THE NAME OF STUDENT NUMBER 1 :

CLOVER

-ENTER GRADE 1 :

50

-ENTER GRADE 2 :

60

-ENTER GRADE 3 :

70

-ENTER GRADE 4 :

80

-

-********************************************

-* THE FINAL GRADE FOR STUDENT CLOVER IS 65 *

-********************************************

-

-ENTER THE NAME OF STUDENT NUMBER 2 :

MOLKS

-ENTER GRADE 1 :

70

-ENTER GRADE 2 :

80

-ENTER GRADE 3 :

90

-ENTER GRADE 4 :

100

-

-*******************************************

-* THE FINAL GRADE FOR STUDENT MOLKS IS 85 *

-*******************************************

-END.

Kỹ năng: Bất kì công việc gì, Lập trình C

Xem thêm: variable programming, variable in programming, programming variable, programming loops, printed names, or in c programming, loops programming, loops in programming, in c programming, & in c programming, c++ programming test, c++ programming problem, c programming loops, c programming input output, c# programming examples, c programming examples, c programming example, c programming class, class in programming, c code examples, c.by examples, 0 in c programming, programming tests, programming in c++, c++ code examples

Về Bên Thuê:
( 5 nhận xét )

Mã Dự Án: #1867063

Đã trao cho:

maysam

quick job

$10 USD trong 0 ngày
(151 Đánh Giá)
7.1