回复 16楼 renkejun1942
打印出最大的三个值,我用了好几种方法了 都打印不出来。int a , b , c;
int max= 0 ;
int arr [10]= {1,2,3,4,5,6,7,8,9,10};
for (a=0; a < 10 ; a ++)
{
if (arr[a]>max)
{
max= arr[a] ;
}
for (b = 0 ; b < 10 ; b ++)
{
if (b<max )
{
b =arr[b] ;
}
}
}
printf("max =%d \n",max );
printf("b =%d\n",b);