Hi guys, the loop is really easy, and so simple I have no idea why I do not see what is wrong with it.
OK, it looks like this:
I tried to insert printf inside the loop to see what is happening. The result was that the loop is infinite and the counter never increments.Code:while (counter = 2, counter < entered_prime) { modulus = entered_prime % counter; printf("Modulus %d, Times %d. ", modulus, counter); ++counter; }
Could someone be so nice and tell me what I am doing wrong?
Thanks.