武汉科技大学ACM :1003: A+B for Input-Output Practice (III)
2024-10-19 04:31:29
Problem Description
Your task is to Calculate a + b.
Input
Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing 0 0 terminates the input and this test case is not to be processed.
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
0 0
Sample Output
6
30
#include <iostream>
using namespace std; int main()
{
int i,j;
while ( cin >> i >> j && (i || j )!=)
cout << (i + j) << endl; return ;
}
最新文章
- android 自定义控件——(三)水平线、虚线
- Linux Hadoop2.7.3 安装(单机模式) 二
- PRML读书后记(一): 拟合学习
- sass入门教程
- node 初识
- 问题解决——XP线程池找不到QueueUserWorkItem
- von Neumann architecture
- 继承TextView简单画一个尺子
- string 与char* char[]之间的转换 2015-04-09 11:30 29人阅读 评论(0) 收藏
- poj 1185 炮兵阵地(三维状态压缩dP)
- CSS3 垂直树状图——运用 :before 和 :after
- ajax跨域解决方案(服务端仅限java)
- Hadoop shuffle与排序
- 采用CSS3 Media Query技术适应Android平板屏幕分辨率和屏幕像素密度
- 将Win7系统将默认打开的库改为计算机
- Java课程设计—学生成绩管理系统(201521123005 杨雪莹)
- EXISTS/NOT EXISTS CASE WHEN等使用方法
- 使用mpvue开发小程序教程(一)
- 解决悬浮的<;header>;、<;footer>;遮挡内容的处理技巧
- 前端安全之XSS