newbie here,
I have two variables which generate random numbers through .Random
. I want them keep rolling until both variables generate two different values, si
the while execute the statement untill the condition is true. In your code the condition is given by (diceRolled1 != 5) && (diceRolled2 != 4). The && operator require true that all operands be true. Given this Your loop will end when at least one of the expression will be false.
To finish the program when it generate 5 and 4 you have to use this:
(!(diceRolled1 == 5) && (diceRolled2 == 4))