|
Problem Description
Your task is to Calculate a + b.
|
|
Input
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
|
|
Output
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
|
|
Sample Input
1 5 10 20 |
|
Sample Output
6 30 |
#include <stdio.h>
int main(void)
{
int a, b, i = 0;
while(i < 5)
{
scanf("%d%d", &a, &b);
printf("%d\n\n", a + b);
i ++;
}
return 0;
}
本文介绍了一个简单的C语言程序,用于接收一系列整数对a和b作为输入,并输出每一对整数的和。示例输入包括两组整数(1, 5)和(10, 20),对应的输出为它们的和6和30。
1224

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



