I have a simple Do While loop that doesn't work. What I am trying to do is to collect an integer and if the number is even, continue looping but if it is not even stop looping.
I can't get it to work with my code:
int xyz = 0;
do
{
Console.WriteLine(xyz);
xyz++;
}
while (xyz % 2);
Thanks in advance...