Compare Data stored to find the highest.

How do I compare multiple datas?

I have climate data for 6 months and is trying to find the highest climate month among all 6 months. How do I do that? Thanks.
you can compare two values with this statement:

1
2
3
4
5
6
if(value1>value2){
//code indicating first is bigger
}
else{
//code indicating second is bigger
}


I'm not sure about a massive amount of comparing, though.
@blobbob110: The comment on line 5 is incorrect; the values could be equal too.

@cxxsey:
You need a variable to memorize the "top month". When you read a new month, you have to test whether it is higher than the top so far. If it is, then you update the top to point to this new winner. When all months have been seen, the top month is known.
Topic archived. No new replies allowed.