求助c语言的a+b问题Problem DescriptionCalculate a + b.InputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputFor each pair of input integers a and b you should output the su
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 19:43:09
求助c语言的a+b问题Problem DescriptionCalculate a + b.InputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputFor each pair of input integers a and b you should output the su
求助c语言的a+b问题
Problem Description
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 in one line,and with one line of output for each line in input.
Sample Input
1 5
2 3
Sample Output
6
5
Source
FOJ1000
这是我写的:
#include
void main()
{
int a,b;
scanf("%d %d",&a,&b);
printf("%d\n",a+b);
}
为什么我在vc6里测试答案是对的,但提交上去不对?
求助c语言的a+b问题Problem DescriptionCalculate a + b.InputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputFor each pair of input integers a and b you should output the su
The input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.
他要你的程序能够一次输入很多对整数,每行一对,算出来之后,再每行一个结果显示出来,你的程序只处理一对数字