hdoj1089
2015-07-20 20:36
260 查看
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
Sample Output
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 10 20
Sample Output
6 30 【正确答案】#include <stdio.h> int main() { int a,b; while(scanf("%d%d",&a,&b)!=EOF) { printf("%d\n",a+b); } return 0; }【分析】未知运行次数用while语句
相关文章推荐
- How far away ?
- 使用K-NN算法解析验证码
- ios学习笔记--(c基础5)
- Palindromes
- UVA 537(字符串)
- storm中bolt接收数据
- Android50道面试题
- android代码控制seekbar的样式
- POJ 2752 Seek the Name, Seek the Fame(KMP)
- Cocos2dx 2.x 安卓重力检测 旋转屏幕
- Java NIO原理图文分析及代码实现
- 锁屏效果
- 如何在Spring加载bean之前设置系统属性
- linux常用命令
- 第五天 类和对象
- Divisibility by Eight
- Unity退出后保存数据,PlayerPrefs 玩家偏好
- [UVA400]Unix ls[格式输出]
- B 类 对象 继承 多态与动态绑定
- 高阶函数 Higher-order function