#include<stdio.h>
int sum(int ar[],int rows);
int main(void)
{
const int row=20;
int ar[]={4,32,1,5,6,75,8,6,4,2,43,67,78,222,789,444,333,222,333,345};
printf(“数组中最大的数是%d\n”,sum(ar,row));
return 0;
}
int sum(int ar[],int rows)
{
int i;
int zuida=0;
for(i=0;i<rows;i++)
zuida=(ar[i]>zuida)?ar[i]:zuida;
return zuida;
}