墨离


私信TA

用户名:CZH332287662

访问量:6376

签 名:

等  级
排  名 3482
经  验 1837
参赛次数 2
文章发表 9
年  龄 21
在职情况 学生
学  校 环境保护工程职业学院
专  业 软件技术

  自我简介:

解题思路:





注意事项:





参考代码:

#include<stdio.h>

int main()

{


   int a,b;

   for(;scanf("%d %d",&a,&b)!=EOF;)

  printf("%d\n",a+b);

   return 0;


}

或者

#include<stdio.h>

int main()

{

int a,b;

while(scanf("%d %d",&a,&b)!=EOF)

{

printf("%d\n",a+b);

}

return 0;

}


 

0.0分

5 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区

#include<stdio.h>
int a,b;
int main()
{
    scanf("%d %d",&a,&b);
    printf("%d\n",a+b);
    return 0;
}


这样为什么不行?
2021-04-01 16:22:14
  • «
  • 1
  • »