Write a program that asks the user the daily temperature at noon over the course of one month. Store the values in an array. At the end of the program, display the highest and lowest temperature, as well as the average temperature over the course of the month.
I tried finding the highest temperature using if/else but for some reason high is always the sum of the arrays. Any help will be greatly appreciated thanks alot in advance!
ps. replaced 30 with 3
using namespace std;
int main ()
cout<<"Enter noon temperatures for 3 days\n";
for (int a=0;a<3;a++)
cout<<"The average temperature is"<<avg<<endl;
cout<<"The highest temperature is"<<high<<endl;