热门

最新

红包

立Flag

投票

同城

我的

发布
m0_68130794
我是秀秀
3 年前
truem0_68130794

#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的学习

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
纯css 视差滚动
立即登录