Enter marks for up to ten subjects to calculate the total, average, result, and grade. Each subject is marked out of 100.
gcc -std=c11 -Wall -Wextra main.c -o marks
./marksOn Windows PowerShell, compile with -o marks.exe and run ./marks.exe.
For example, three subjects with marks of 90, 70, and 80 give a total of 240/300, an average of 80%, and grade B.
These are example rules, not a university grading scheme. Every subject needs at least 40 to pass. A failed subject makes the overall grade F.
| Average | Grade |
|---|---|
| 90 and above | A |
| 75 to below 90 | B |
| 60 to below 75 | C |
| 40 to below 60 | D |
| Below 40 | F |
Arrays, numeric input, loops, arithmetic, and conditions.
Accept subject names and print a subject-by-subject report.