I got the average to work, but how can I make this program first list
the high & low temps? Any help with this would be great.


int sum, count; sum=0; count=0;
do {
count++;
int number=readNumber();
sum=sum+number;
cout << "The average is " << sum/(double)count << endl;
} while (runLoop);

You must also have variables for high and low, initially set to values well out of range (ie, high = -999, low = +999)

As each value is read in, compare it to high and to low, updating the appropriate variable as needed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.