// Loop
for ( int i = 1; i <= 3; i++)
{
cout << " Please enter the number of pupils that attended the show? ";
cin >> nrPupilsAttended;
for ( int i = 1; i <= nrPupilsAttended; i++)
{
cout << " Whom do you consider the most interesting character? ";
cin >> mostInteresting;
switch (mostInteresting)
{
case 1:
cout << "S for Scarlett" << endl;
break;
case 2:
cout << "R for Rhett" << endl;
break;
case 3:
cout << "A for Ashley" << endl;
break;
case 4;
cout << "M for Melanie" << endl;
break;
default:
cout << "Anything else for another actor" << endl;
}
}
}
cout << " The total for Scarlett is " << nrScarlett << endl;
cout << " The total for Rhett is " << nrRhett << endl;
cout << " The total for Ashley is " << nrAshley << endl;
cout << " The total for Melanie is " << nrMelanie << endl;
cout << "The total for another actor is " << nrOther << endl;
TIP: When posting code, either click the insert code button and then paste your code between the two 'tags' or paste your code, then highlight it and then click the insert code button.