I tryed to figure out this bug for 2 hours, couldn't get it. I'm just trying to make sure I know how to do this (its not homework) and this is the only thing I could think of making. I am using DJGPP and every time I try to run it, all of the case lines get an error. Whats wronge? It worked in BASIC!!!
Please help! Thanks!!!Code:switch ( age ) { case >= 0 && < 5: cout <<"You are a toddler!\n"; break; case >=5 && < 13: cout <<"You are a kid!\n"; break; case >= 13 && < 19: cout <<"You are a teenager!\n"; break; case >= 20 && < 30: cout <<"You are a young adult!\n"; break; case >= 30 && < 55: cout <<"You are an adult!\n"; break; case >= 55: cout <<"You are a valued old dude!\n"; break; }//end switch



LinkBack URL
About LinkBacks


