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
3 Antworten
+ 1
https://code.sololearn.com/cFZu9AvqjBg5/#cpp
Please refer to this link for the solution
0
thanks
0
cout << "Enter your age" << endl;
cin >> age;
cout << "You are " << age << endl;