I was bored and started playing around and came up with this, it says syntax error before else. Another time I changed something it displayed both the second and third cout when I typed in 12.Code:#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int yep; cout<<"how old are you?"; cin>>yep; if (yep==12);{ cout<<"your name must be darrell"; } else;{ cout<<"you suck"; } system("PAUSE"); return EXIT_SUCCESS; }



LinkBack URL
About LinkBacks




kinda like the void main vs. int main thing... I think we've strung up every void mainer out there already, so the resistance has crumbled and dozens of high schoolers were taught the right way.