📄 1000.cpp
字号:
//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
//Sample Output
//6
//Hint
#include<stdio.h>
void main()
{
int input1,input2;
while(scanf("%d %d",&input1,&input2)!=EOF)
printf("%d\n",input1+input2);
}
//总结:scanf函数的返回值等于其输入的参数个数
//若输入的参数个数为0,则其返回值为EOF。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -