0

What is the error I didn't get it....

#include <iostream> using namespace std; int main() { int age; cout<<"Enter your age"<<endl; cout<<"You are "<<age<<endl; cin>>age; if (age<=20){ cout<<"too young."; } return 0; if (age<=47){ cout<<"adult."; } return 0; if (age<=100){ cout<<"too old."; } if (age>100){ cout<<"You dont belong to this planet" ; } return 0; } it always shows the result 789163

10th Jun 2017, 3:48 PM
Saksham
Saksham - avatar
3 Antworten
+ 1
https://code.sololearn.com/cFZu9AvqjBg5/#cpp Please refer to this link for the solution
10th Jun 2017, 3:57 PM
Gaurav Garg
Gaurav Garg - avatar
0
thanks
10th Jun 2017, 3:58 PM
Saksham
Saksham - avatar
0
cout << "Enter your age" << endl; cin >> age; cout << "You are " << age << endl;
10th Jun 2017, 4:14 PM
Andrés04_ve
Andrés04_ve - avatar