HDU篮球队需要一个高大中锋,只要个子高,不会打球没关系。
请你从n个候选人找出个子最高的。
输入格式:
第1行包含一个整数n,表示人数。
第2行包含n个实数,表示n个人的身高。
输出格式:
包含一个实数,表示最高的人的身高,小数点保留2位。
输入样例:
在这里给出一组输入。例如:
10
161.01 226 180.76 175 177 165 158 150 170 171
输出样例:
在这里给出相应的输出。例如:
226.00
#include <stdio.h>
int main()
{
int count,i;
double height,max=0.;
scanf("%d",&count);
for(i=1;i<=count;i++)
{
scanf("%lf",&height);
max=max>height?max:height;
}
printf("%.2f",max);
return 0;
}