previous boolean problem
ok it wouldnt let me reply to the last thread but hey. this is my program and no matter what the values are it always replies with true why?
int y=5<7 and 5<4
print "true"
March 08, 2003 03:09 PM
quote: Original post by billy bob128
int y=5<7 and 5<4
print "true"
I''m not sure what language you are using, but I think I know what your problem is. "if" What you are looking for is probably "if y=5<7 and 5<4" or something similar. It''s the difference between saying "it is eleven o''clock and I''m going to bed" and "if it is eleven o''clock I''m going to bed"
If this is c or c++, the two biggest errors that will make a statement always appear to be true is using = instead of ==, and adding a semicolon to the end of the if statement.
Chess is played by three people. Two people play the game; the third provides moral support for the pawns. The object of the game is to kill your opponent by flinging captured pieces at his head. Since the only piece that can be killed is a pawn, the two armies agree to meet in a pawn-infested area (or even a pawn shop) and kill as many pawns as possible in the crossfire. If the game goes on for an hour, one player may legally attempt to gouge out the other player's eyes with his King.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement