Help me to write a C program that calculate the student grades?

Glady

New member
Here the problems:
Write a program for the following problem. An instructor needs a program that accepts a student identification number and three test scores, test1, test2, and final_test as input, and determines and outputs for each student the semester average and the final letter grade according to the following scheme:

SEMESTER AVERAGEFINAL LETTER GRADE
90 – 100A
80 – 89B
70 – 79C
60 – 69 D
0 – 59F

The semester average for students is computed using the formula
semester_average = 0.20 * test1 + 0.30 * test2 + 0.50 * final_test

Student identification numbers are four-digits integer. Input should terminate when the instructor types 0 for the student identification number. The instructor also wants a distribution of letter grades and a class average. Class average is computed using the following formula:

class_average = (4 * number_of_A_grades + 3 * number_of_B_grades + 2 * number_of_C_grades + 1 * number_of_D_grades)/number_of_students





A typical interactive session is given below. Design your program accordingly.


Enter the student idno: 1100
Enter test score 1: 70
Enter test score 2: 80
Enter final score: 100
Semester average for student 1100: 88
Letter grade for student 1100: B

Enter student idno: 1200
Enter test score 1: 75
Enter test score 2: 65
Enter final score: 76
Semester average for student 1200: 73
Letter grade for student 1200: C


Enter student idno: 0
Grade distributions:

A5
B6
C7
D2
F0

Class average: 2.63
 
How about you learn the basics of C and learn to do it yourself, this is not difficult at all, just give it a little thought.
 
we are asking for help. we need answers and not recommendations. not that recommendations is not good but we are in dire need of help man!!
 
Back
Top