Tuesday, August 16, 2011

Why is the it not saying anything when i enter a non-prime number?! where is my mistake?!?

remove the else part in the while loop. It is over writing the variable isPrime. You dont need the else part at all.just keep the counter incrementation there.

No comments:

Post a Comment