Ok so this is my homework and I am not asking anyone to do it for me. I am asking where I have gone wrong I am writing for loop with a switch so that scores can be inputted in by a judge. The issue that I am running into is that I will put out an the text then the test happens and the code puts out the switch statement 5 times with random number. Here is what I have written.
Thank you for your help. I am just not seeing where I am wrong. Once again I am not asking you do my work for me just to look at what I am missing.
Code:
int main()
{
int diver;
int option;
int Judge;
cout << "Enter Divers Name:";
cin >> diver;
for (option=0; option <5; option++)
//if (option)
cout << "Judge Please select a number between 0-9:" << Judge << endl;
cin >> option;
cout << option << endl;
option++;
do{
switch (option)
{
case 1: cout << "Score is 1"<< endl;
break;
case 2: cout << "Score is 2"<< endl;
break;
case 3: cout << "Score is 3"<< endl;
break;
case 4: cout << "Score is 4"<< endl;
break;
case 5: cout << "Score is 5"<< endl;
break;
case 6: cout << "Score is 6"<< endl;
break;
case 7: cout << "Score is 7"<< endl;
break;
case 8: cout << "Score is 8"<< endl;
break;
case 9: cout << "Score is 9"<< endl;
break;
case 0: cout << "Score is 10"<< endl;
break;
default: cout << "Invalid Entry" << endl;
break;
}
}
while (Judge < 5);
return 0;
}