forked from crypticani/C_Programs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMARKS.C
39 lines (37 loc) · 959 Bytes
/
MARKS.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
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
{
int phy,chem,eng,hin,math,total;
float percentage;
char *name;
printf("Enter Your Name : ");
gets(name);
printf("Enter your marks of physics:\n");
scanf("%d",&phy);
printf("Enter your marks of Chemistry:\n");
scanf("%d",&chem);
printf("Enter your marks of Maths:\n");
scanf("%d",&math);
printf("Enter your marks of English:\n");
scanf("%d",&eng);
printf("Enter your marks of Hindi:\n");
scanf("%d",&hin);
total=eng+hin+phy+chem+math;
percentage=(float)total/5;
printf("Hello %s !\n",name);
printf("your total marks is %d and your percentage is %f%\n",total,percentage);
if(percentage>=75){
printf("Congratulations! Your grade is A\n Keep up the good work\n");
}
else if(percentage<75&&percentage>=50){
printf("Congratulations! your grade is B\n you are working hard but try to improve.\n");
}
else{
printf("your grade is C\n Work hard!\n");
}
getch();
}
}