Jul-24-2019, 02:19 AM
Your while condition is false to start with, because Count starts at 0. (note that count and Count are two different variables, pick one and use it consistently). You want to loop while Count < 10, so the loop stops after 10 questions. Note that line 9 is backwards. You want to assign p to MaxValue, not MaxValue to p.
As it is now, your code goes until it gets 10 odd numbers, ignoring even numbers. That wasn't quite how you stated the problem initially. If that is what the problem requires, all is well. Otherwise, move line 9 down one line, and unindent it once.
As it is now, your code goes until it gets 10 odd numbers, ignoring even numbers. That wasn't quite how you stated the problem initially. If that is what the problem requires, all is well. Otherwise, move line 9 down one line, and unindent it once.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures