Ok, i have this function with 5 variables. score1-score5. Instead of repeating the prompt for user input 5 times in my code is there a way i can use a loop to store the user input and go through each iteration as well? This is homework but it doesn't really matter anymore since i have the program working fine, i would just like to clean up the code a bit. I cannot use an array here either. Thanks in advance for any suggestions.
void getScore(double &score1, double &score2, double &score3, double &score4, double &score5)
{
cout << "Enter a score: ";
cin >> score1;
cout << "Enter a score: ";
cin >> score2;
cout << "Enter a score: ";
cin >> score3;
cout << "Enter a score: ";
cin >> score4;
cout << "Enter a score: ";
cin >> score5;
cout << "-------------------" << endl;