int main()
{
int n = 1;
int i = 1;
int max = 1;
scanf("%d", &max);
while (n < 10)//将第一个数赋给max,后面只需在输入9个数,即可将数比完,得到最大数
//循环9次
{
scanf("%d", &i);
if (max <= i)
max = i;
n++;
}
printf("%d", max);
return 0;
}
标签:10,int,max,最大值,个数,scanf,输入 From: https://blog.51cto.com/u_16220477/7558380