【max num】There are some students in a class, Can you help teacher find the highest student .
2 3 170.00 165.00 180.00 4 165.00 182.00 172.00 160.00
180.00 182.00
#include<stdio.h>
int main()
{
int t, n, i;
double a[100], max;
scanf("%d",&t);
getchar();
while(t--)
{
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%lf",&a[i]);
}
max=a[0];
for(i=1;i<n;i++)
{
if(a[i]>max)
{
max=a[i];
}
}
printf("%.2lf\n",max);
}
return 0;
}