0
点赞
收藏
分享

微信扫一扫

HRBUST—1891 A + B Problem VII


A + B Problem VII

Description

我们总是能够遇到 A + B 问题,因为这个问题实在是太经典了!Input本题有多组测试数据,对于每组数据输入两个整数A和B(绝对值不超过1000),输入处理到文件结束。Output输出 A + B 的值并换行,每两组数据之间有一个空行!

Sample Input

1 1
2 2

Sample Output

2

4

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


举报

相关推荐

0 条评论