Mutiple Dailog Box Prompts Depending On User Input
Here's what I need to do: Ask the user how many quizzes he took. Then,
prompt the user for that many grades. When the user is done entering the
grades, tell him his average grade for all his quizzes. You don't know
what number the user will enter
For example, if the user says he took 3 quizzes, the prompts should say:
"Enter quiz grade 1: ", then "Enter quiz grade 2: ", then "Enter quiz
grade 3: "
This is as far I've gotten..I'm not sure how to prompt the user mutiple
times depending on how many quizzes the user took...
int numQuiz;
count = 1;
numQuiz = Integer.parseInt(JOptionPane.showInputDialog("How many quizzes
did you take?"));
do
{
} while (count != 0);
No comments:
Post a Comment