It looks like you're new here. If you want to get involved, click one of these buttons!
So i was trying to make program that roll a dice and keeps looping until it rolled a six. i made the program using for loop. so at first, i made it like this
for (int rollDice = 0; rollDice != 6; rollDice++);
when i put 6 in the middle, the program stopped looping when it rolled a 5 instead of 6.
but when i put 7, the program stopped when it rolled 6.
why is that happening? doesnt the "rollDice != 6" mean that it will loop as long as rollDice is not 6?
thank you and sorry for (probably) bad english.