I'm guessing you don't yet know arrays, use of methods beyond the main() method, or use of helper classes. If you can't generalize the asking of questions and providing answers, then the purpose of...
Type: Posts; User: GregBrannon
I'm guessing you don't yet know arrays, use of methods beyond the main() method, or use of helper classes. If you can't generalize the asking of questions and providing answers, then the purpose of...
Something like:
int questionNumber = 1;
while ( questionNumber < 11 )
{
// ask question, get answer, etc.
// increment the loop control variable so that it's not an infinite loop
Anytime a block of code needs to be repeated, a loop can be the programming tool to accomplish that. I see you have the statement "Question 1 of 10" in your code which suggests to me the code is...