I've just started doing C++ and finding it quite tricky! I'm trying to make the classic number guessing game in which the user has 3 guesses. So far i've managed to get the random number generatorand the 3 three guesses sorted and when the user enters the number i'd like the game to say if it's hot or cold. i'm using the code:
if((usersGuess - random == 1) || (usersGuess - random == -1))
else if((usersGuess - random == 2) || (usersGuess - random == -2))
when i run the program, it doesn't go further than the first guess, which is always correct! Any help???