its my first day programming in anything...
and i was messing with something off of this tutorial (click here)
the point in my modification is to make anything above 60 say you are old and anything below it say you are young
i got that part working
after that i decided i wanted to make it so if you say a certian number (66 here)
that it would respond "moo"
i dont know what i did wrong though... perhaps someone else with more experiance can help me...
also... what does iostream mean and why doesnt it work without it... the first guide doesnt say what it is and why it doesnt work without it but it says it doesnt work without it...
i assume there are other things besides iostream...
and finally... the code in question
Code:#include <iostream> using namespace std; int main() { int age; cout<<"please input your age:"; cin>> age; cin.ignore(); if ( age < 60 ) ! ( 66 ) { cout<<"you are pretty young \n"; } else if ( age > 60 ) ! ( 66 ) { cout<<"you are really old \n"; } else if ( age == 66 ) { cout<<"moo \n"; } cin.get(); }