Skip to content

About

Calculate subject totals, average marks, and grades in C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Student marks calculator

Enter marks for up to ten subjects to calculate the total, average, result, and grade. Each subject is marked out of 100.

Run

gcc -std=c11 -Wall -Wextra main.c -o marks
./marks

On 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.

Grading rules

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

Concepts

Arrays, numeric input, loops, arithmetic, and conditions.

Possible next change

Accept subject names and print a subject-by-subject report.

About

Calculate subject totals, average marks, and grades in C.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages