Array sorting help

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!

For one thing, you mistakenly compare days[a + 1] > days[a]. Now, you only ever input into days[a] so days[a + 1] is always garbage. Even if you fix that though the code will still be wrong because in order to find the maximum, you have to make a guess for the high, and compare the value of high to the rest of the elements, assigning higher elements to high as you go.