I keep trying lesson 2:If statements in C++ programming in my complier but it doesnt come out like it says it should. Here it is:
Code:
#include <iostream>
using namespace std;
int main()
{
int age;
cout<<"Please input your age: "; // I input my age which is 13
cin>> age;
cin.ignore();
if ( age < 100 ) {
cout<<"You are pretty young!\n";
}
else if ( age == 100 ) {
cout<<"You are old\n";
}
else {
cout<<"You are really old\n";
}
cin.get();
}
And all that comes out of it is 13 and not You are pretty young like the tutorial says it is suppose to what do I do could you help me plz!!!