forked from avinashbest/codewithharry-c-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11_marks.c
More file actions
27 lines (21 loc) · 621 Bytes
/
11_marks.c
File metadata and controls
27 lines (21 loc) · 621 Bytes
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
#include <stdio.h>
int main()
{
int physics, chemistry, maths;
printf("\nEnter the physics marks: ");
scanf("%d", &physics);
printf("Enter the chemistry marks: ");
scanf("%d", &chemistry);
printf("Enter the maths marks: ");
scanf("%d", &maths);
float average = physics + chemistry + maths / 3;
if ((average < 40) || (physics < 33) || (chemistry < 33) || (maths < 33))
{
printf("Your total percentage is %.3f and you are fail\n\n", average);
}
else
{
printf("Your total percentage is %.3f and you are pass.\n\n", average);
}
return 0;
}