A+B Problem
Time Limit:1000MS Memory Limit:65536K
Total Submit:308 Accepted:181
Description
A+B Problem 水题水题, 没有最水,只有更水。
Input
连续输入两个整数 a、 b,当a=0且b=0时结束输入
Output
输出a+b的值,并换行。
Sample Input
1 2
0 0
Sample Output
3
Source
XiaoZhou
#include<stdio.h>
main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF&&a||b)
{
printf("%d\n",a+b);
}
}

本文介绍了一个经典的编程入门问题——A+B Problem。通过简单的输入输出练习,帮助初学者掌握基本的编程语法。文章提供了完整的C语言代码示例,并解释了如何读取两个整数并输出它们的和。
1432

被折叠的 条评论
为什么被折叠?



