#include<stdio.h>
int main()//任意10个数,求最大值
{
int i,max,x;
i=1;max=x;
scanf("%d",&x) ;
while(i<=9)
{
scanf("%d",&x);//输入一个数存在x中
i++;
if(x>max) max=x;
}
printf("max is %d\n",max);
return 0;
}
#include<stdio.h>
int main()
{
int i,s,x;//任意输入10个数,求和
i=1;s=0;
while(i<=10)
{
scanf("%d",&x);
s=s+x;
i=i+1;
}
printf("%d",s);
return 0;
}//while的学习