求C语言大神赐教:编写程序,从键盘输入20个整数,求其中最大值并输出

如题所述

#include<stdio.h>
#include<stdlib.h>
int main()

{
int x,max,i;
scanf("%d",&x);
max=x;
for(i=1;i<20;i++)
{
scanf("%d",&x);
if(max<x)
max=x;
}
printf("Max=%d",max);
system("pause");
}
温馨提示:答案为网友推荐,仅供参考