-
Notifications
You must be signed in to change notification settings - Fork 0
/
grade_System.c
61 lines (43 loc) · 824 Bytes
/
grade_System.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <stdio.h>
#include <stdlib.h>
main() {
int x;
char ch;
char ce;
printf("Enter your number:\n");
scanf("%d",&x);
if (x<=100&& x>=80){
ch='A';
ce='+';
printf("Your grade is %c%c",ch,ce);
}
else if (x<=79&&x>=70){
ch='A';
printf ("Your grade is %c",ch);
}
else if (x<=69&&x>=60) {
ch='A';
ce='-';
printf("Your grade is %c%c",ch,ce);
}
else if (x<=59&&x>=50) {
ch='B';
printf ("Your grade is %c",ch);
}
else if (x<=49&&x>=40) {
ch='C';
printf("Your grade is %c",ch);
}
else if (x<=39&&x>=33) {
ch='D';
printf ("Your grade is %c",ch);
}
else if (x<33&&x>=0) {
ch='F';
printf ("Your grade is %c",ch);
}
else {
printf ("Wrong Input");
}
return 0;
}