Calculating Average and high/lowest test score
Hello, I am getting frustrated because I am currently trying to figure out how to solve this program:
Write a program that prompts the user for test scores (doubles). The user enters -1 to stop the entry. After all of the test scores have been entered, calculate the average, the highest and the lowest test score.
So far this is what I have:
#include <iostream>
using namespace std;
int main()
{
double score, average, highest, lowest;
int counter = -1;
do
{
counter++;
cout << "Please enter a score (enter -1 to stop): ";
cin >> score[counter];
} while (scores[counter] >= 0);
cout << "Highest is ";
cin >> highest;
cout << "Lowest is ";
cin >> lowest;
// I am stuck at this point which is to CALCULATE AND DISPLAY THE AVERAGE,
// THE HIGHEST AND LOWEST TEST SCORE
}