数组中找最大值
#include<stdio.h>
int main()
{
int a[] = {3,2,5,8,4,7,6,9};
int len = sizeof(a) / sizeof(a[0]);
int max = a[0];
for( int i = 1; i < len; i++ )
{
if( a[i] > max )
{
max = a[i];
}
}
printf("%d", max);
return 0;
}
标签:int,max,最大值,len,数组,sizeof
From: https://www.cnblogs.com/yesiming/p/17444525.html