-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif-else.cpp
More file actions
46 lines (45 loc) · 1.01 KB
/
if-else.cpp
File metadata and controls
46 lines (45 loc) · 1.01 KB
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
#include<bits/stdc++.h>
using namespace std;
int main(){
int age;
cin>> age;
if(age<=10 && age>=0){
cout<<"you are akid"<<"\n";
}
else if(age<=20 && age>10)
{
cout<<"You are in adoloscent age";
}
else if(age >20 && age<=40)
{
cout <<"you are an adult";
}
else{
cout<<"you are an old person";
}
}
/*WAP for marks grading system
*/
#include<bits/stdc++.h>
using namespace std;
int main(){
int m;
if(m>=0 && m<=35){
cout<<"student is passed the exam";
}
else if(m>35 && m<=50){
cout<<"student has passed in 3rd class";
}
else if(m>50 && m<=70){
cout<<"student has passed in 2nd class";
}
else if(m>70 && m<=80){
cout<<"student has been passed in 1st class";
}
else if(m>80 && m<=100){
cout<<"student passed in distinction";
}
else{
cout<<"congrats student has failed, anthaaaaaaaaaaaa assaaaaaaaaaaaam ";
}
}