-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrade Checker.c
47 lines (45 loc) · 965 Bytes
/
Grade Checker.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<stdio.h>
int main()
{
int hindi,english,maths,scince,chemistry,total;
float percentage;
printf("Enter Hindi Marks\n");
scanf("%d",&hindi);
printf("Enter English Marks\n");
scanf("%d",&english);
printf("Enter Maths Marks\n");
scanf("%d",&maths);
printf("Enter Science Marks\n");
scanf("%d",&scince);
printf("Enter Chemistry Marks\n");
scanf("%d",&chemistry);
total=hindi+english+maths+scince+chemistry;
printf("Total Marks is = %d \n",total);
percentage=total/5;
printf("Total Makrs with Percentage is = %f\n",percentage);
if (percentage>=90)
{
printf("A+");
}
else if(percentage>=80)
{
printf("A");
}
else if(percentage>=70)
{
printf("B+");
}
else if(percentage>=60)
{
printf("B");
}
else if(percentage>=50)
{
printf("C");
}
else
{
printf("Fail");
}
return 0;
}