Get highest number of X numbers

Hi,

I know how to get higher numbers of 2
1
2
3
4
5
6
7
int a = 5, b = 3;
if(a < b)
{
}
else
{
}


but how can I get highest number of X numbers? let's say I have 5 random numbers, how can I sort them from lowest to highest, AND get third number from lowest ?
what ? O_o
Put the five numbers in a vector. Use sort.

http://www.cplusplus.com/reference/algorithm/sort/
Topic archived. No new replies allowed.