Heh, I knew that, I just didnt know if I had to use && and such. I know how to do this all mathmatically, just not in C++ form yet.
( If that made any sense)
also what is wrong with this it keeps giving me an error
Code:
#include <iostream>
using namespace std;
int main()
{
int age;
cout<<"Please input your age: ";
cin>> age;
cin.ignore();
if ( age < 5 || age == 5 ) {
cout<<"Are you potty trained yet?!\n";
}
else if ( age > 5 && age < 12 || age == 12 ) {
cout<<"Woo! You're maturing.\n";
}
else if ( age > 12 && age < 20 ) {
cout<<"You're a teenager, welcome to hell.\n";
}
else if ( age > 21 && < 30 ) {
cout<<"Party it up, you can drink, your prolly in college, or just out of it. Have fun.\n";
}
else if ( age == 20 ) {
cout<<" You are the ........tiest age ever. You are in college, alot of work.. and you can't drink yet. Hold int here one more year.\n";
}
else if ( age > 30 && age < 40 || age == 30 || age == 40) {
cout<<"You are getting towards middle aged, start to settle down.\n";
}
else if ( age > 40 && age < 47 ) {
cout<<"You're now middle aged. Get used to it.n\";
}
else if ( age == 47 ) {
cout<<"I love you mom!!!!!\n";
}
else if ( age > 100 || age == 100 ) {
cout<<"Plan your funeral, make sure your will is correct, etc.\n";
}
else if ( age > 47 && age < 60 ) {
cout<<"You're getting up there in years!!!\n";
}
else if ( age > 60 || age == 60 && age < 100 ) }
cout<<"You're old.\n";
}
cin.get();
}
I followed the format of the tutorials one, I just wanted to see if I could elaborate on it.