Description
There are some students in a class, Can you help teacher find the highest student .
Input
There are some cases. The first line contains an integer t, indicate the cases; Each case have an integer n ( 1 ≤ n ≤ 100 ) , followed n students’ height.
Output
For each case output the highest height, the height to two decimal plases;
Sample Input
2 3 170.00 165.00 180.00 4 165.00 182.00 172.00 160.00
Sample Output
180.00 182.00
//水题
#include<stdio.h> int main() { int a,c,k,i; double b; double MAX=0.0; scanf("%d",&c); for(k=1;k<=c;k++) { double max=0.0; scanf("%d",&a); for(i=1;i<=a;i++) { scanf("%lf",&b); if(max<b) max=b; MAX=max; } printf("%.2lf ",MAX); } return 0; }
#include<stdio.h> #include<string.h> int main() { int i,x,y,c,d,z; char a[50],b[50]; scanf("%d",&x); for(i=1;i<=x;i++) { scanf("%s",a); scanf("%s",b); c=strlen(a); d=strlen(b); for(z=1,y=1;y<=(c/2);y++) { a[c+d-z]=a[c-z]; z++; } for(y=1;y<=d;y++) a[c/2+y-1]=b[y-1]; a[c+d]='