#include
int function(int a, int b);
int main() { //确定数组元素个数,确保不超过数组限制范围 int geshu; scanf("%d",&geshu); int shuzu[geshu];
//赋值数组
int a;
for (a = 0;a<geshu;a++) {
scanf("%d",&shuzu[a]);
}
//
int max = shuzu[0];
for (a=1;a<geshu;a++) {
max = function(max,shuzu[a]);
}
printf("%d",max);
return 0;
}
int function(int a,int b) { int max; max = (a>b)?a:b;
return max;
}