问题描述:Your task is to Calculate a + b.
作者:何知令
发表时间:2017年2月16日
输入:The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
作者:何知令
发表时间:2017年2月16日
输入:The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
输出;For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
代码:
/*
问题描述:Your task is to Calculate a + b.
作者:何知令
发表时间:2017年2月16日
输入:The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
输出;For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
*/
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
int a,b;
for(i=0; scanf("%d %d",&a,&b)!=EOF; i++)
printf("%d\n\n",a+b);
return 0;
}
程序运行结果展示:
知识点总结:不确定数目的输入
学习心得:好简单,哥哥以为这题会很难呢,咳咳、、