-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathex1.c
47 lines (46 loc) · 926 Bytes
/
ex1.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 physics, chemistry, math;
printf("Enter physics marks");
scanf("%d",&physics);
if (physics>=33)
{
printf("You are pass in physics\n");
}
else
{
printf("You are fail in physics\n");
}
printf("Enter chemistry marks");
scanf("%d",&chemistry);
if (chemistry>=33)
{
printf("You are pass in chemistry\n");
}
else
{
printf("You are fail in chemistry\n");
}
printf("Enter math marks");
scanf("%d",&math);
if (math>=33)
{
printf("You are pass in math\n");
}
else
{
printf("You are fail in math\n");
}
int total = physics+chemistry+math;
printf("Your Total marks are %d\n",total);
int tp = total/3;
if (tp>=40)
{
printf("You are clear pass\n");
}
else
{
printf("You are fail\n");
}
return 0;
}