69,371
社区成员
发帖
与我相关
我的任务
分享
http://bbs.csdn.net/topics/390621996
#include <stdio.h>
int main()
{
int a[10],i,index = 0;
for(i = 0;i < 10;i++)
{
printf("please input the %d number\n",i + 1);
scanf("%d",&a[i]);
if(a[i] > a[index])
{
index = i;
}
}
printf("The largest number is the %d value is%d \n",index + 1,a[index]);
return 0;
}