Thelis
Golden Master
- Messages
- 5,410
Opinions? Ways to streamline it? If any of you guys know a bit of C++, I would love to ask a few questions.
Code:
#include <iostream>
using namespace std;
int main()
{
int age;
cout<<"Please input your age, if you want to take an IQ test, type in 100001:";
cin>>age;
cin.ignore();
if ( age < 40) {
cout<<"You are preeety young!\n";
}
else if ( age > 40 && age < 80 ) {
cout<<"You are getting old\n";
}
else if ( age > 80 && age <110) {
cout<<"You are really old\n";
}
else if ( age >110 && age <150) {
cout<<"You are FUCKING ANCIENT\n";
}
while (age>150)
cout<< "WTF HAX?" << endl;
int a;
int b;
int c;
if (age= 100001)
cout<<"I want to see if you can do multiplication\n";
cout<< "Give me two numbers separated by a space:\n";
cin >> a >> b;
cin.ignore();
cout<< "Now, multiply them and tell me what you get:";
cin >> c;
cin.ignore();
if ( c == a*b ) {
cout<< "Good Job, you are almost as smart as a 3 year old.";
}
else {
cout<<"You are a failure"; }
cin.get();}