/* PromptAndRead reads a sequence of test scores from the keyboard.
 *
 * Receive:      names, a vector of strings,
 *               scores, a vector of doubles
 * Precondition: names is not empty AND scores is empty
 * Output:       prompts for test scores, using names
 * Input:        a sequence of test scores
 * Pass back:    scores containing the input values
 **********************************************************************/

void PromptAndRead(const vector<string> & names, vector<double> & scores)

   double aScore;                          // input variable
   for (int i = 0; i < names.size(); i++)  // for each index in sequence
   {
      cout << "Enter the score for "
           << names[i] << ": ";            //   prompt,
      cin >> aScore;                       //   read, and
      scores.push_back(aScore);            //   append
   }
}

