Write a program for a school grading system in C
Table of contents
No headings in the article.
Creating a school grading system in C involves multiple components, including defining classes, storing student data, calculating grades, and displaying results.
#include <stdio.h>
int main()
{
/**
80-100 A
70-79 B
65-69 C
60-64 D
50-59 E
Below 40 F
*/
int grade;
printf("what is your score \n");
scanf("%d", &grade);
if (grade >= 80 && grade <= 100)
{
printf("A");
}
else if (grade >= 70 && grade <= 79)
{
printf("B");
}
else if (grade >= 65 && grade <= 69)
{
printf("C");
}
else if (grade >= 60 && grade <= 64)
{
printf("D");
}
else if (grade >= 50 && grade <= 59)
{
printf("E");
}
else if (grade >= 0 && grade <= 40)
{
printf("F");
}
else
{
printf("Enter valid score");
}
return 0; }
You can customize and expand this program to include more features or error handling as needed for your specific grading system.