-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainLt11.c
93 lines (73 loc) Β· 1.81 KB
/
MainLt11.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include<stdio.h>
int main(int argc, char const *argv[])
{
int age_11,marks_11;
printf("enter your age\n");
scanf("%d", &age_11);
printf("enter your marks\n");
scanf("%d", &marks_11);
switch (age_11)
{
case 11:
printf("Your age is 11\n");
switch (marks_11)
{
case 45:
printf("your marks is 45\n");
break;
default:
printf("your marks is not 45\n");
break;
}
break;
case 22:
printf("Your age is 22\n");
switch (marks_11)
{
case 55:
printf("your marks is 55\n");
break;
default:
printf("your marks is not 55\n");
break;
}
break;
case 33:
printf("Your age is 33\n");
switch (marks_11)
{
case 66:
printf("your marks are 66\n");
break;
default:
printf("your marks are not 66\n");
break;
}
break;
default:
printf("You are not Ali\n");
break;
}
//write a program to find grade of a student given his marks based on below:
int marks_12;
printf("enter your marks");
scanf("%d", &marks_12);
if (marks_12>=90 && marks_12<=100)
{
printf("Your Grade Is 'A'!!!");
}
else if (marks_12>=80 && marks_12<90)
{
printf("your grade is 'B'");
}
else if (marks_12>=70 && marks_12<80)
{
printf("your grade is 'C'");
}
else if (marks_12>=60 && marks_12<70){
printf("your grade is D");
}
else
printf("your grade is F");
return 0;
}