I am new to C# and have encountered a problem with the following if statement...
measurement = GetRandomInt(0, 2); measurement2 = GetRandomInt(0, 2); if ((measurement == 1) || (measurement2 == 1)) q3correct = 1; else q3correct = 0;
The statement works around 80% of the time and i have checked every possible sequence of numbers several times. It seems to happen randomly but occasionally the variable is given the wrong value.
Thanks in advance.