示例1
/*
Description
你的任务是计算a+b。这是为了acm初学者专门设计的题目。你肯定发现还有其他题目跟这道题的标题类似,这些问题也都是专门为初学者提供的。
Input
输入包含一系列的a和b对,通过空格隔开。一对a和b占一行。
Output
对于输入的每对a和b,你需要依次输出a、b的和。
如对于输入中的第二对a和b,在输出中它们的和应该也在第二行。
Sample Input Copy
1 5
10 20
Sample Output Copy
6
30
*/
#include <stdio.h>
int main(void)
{
int a, b;
while (scanf("%d %d", &a, &b) != EOF)
printf("%d\n", a + b);
return 0;
}
示例2
/*
Description
你的任务是计算a+b。
Input
第一行是一个整数N,表示后面会有N行a和b,通过空格隔开。
Output
对于输入的每对a和b,你需要在相应的行输出a、b的和。
如第二对a和b,对应的和也输出在第二行。
Sample Input Copy
2
1 5
10 20
Sample Output Copy
6
30
*/
#include <stdio.h>
int main(void){
int a,b,n;
scanf("%d",&n);
for(int i=0;i<n;i++){
scanf("%d %d",&a,&b);
printf("%d\n"