HDU 1.1.3 A+B for Input-Output Practice (III)
2016-03-10 17:19
751 查看
[align=left]Problem Description[/align] Your task is to Calculate a + b. |
[align=left]Input[/align] 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. |
[align=left]Output[/align] 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. |
[align=left]Sample Input[/align]1 5 10 20 0 0 |
[align=left]Sample Output[/align]6 30 |
#include <stdio.h> int main(void) { int a, b; scanf("%d%d", &a, &b); while(a != 0 || b != 0) { printf("%d\n", a + b); scanf("%d%d", &a, &b); } return 0; }
相关文章推荐
- PHP排序函数
- HDU 1.1.2 A+B for Input-Output Practice (II)
- HDU 1.1.1 A+B for Input-Output Practice (I)
- 申请TexturePacker免费注册码(TP:639BBF0B)
- autocomplete+PHP+MYSQL的实现模糊查询
- PHP 魔术变量和魔术函数
- Php笔记-基础语法
- 配置 IIS 下的FTP服务器
- YII 邮件发送功能
- CakePHP 3.2插件引入插件篇
- php curl
- Geoip geoip-api-php 库包使用 - 通过ip 找到国家
- JS PHP 乱入
- Selenium WebDriver get ,getScreenshotAs(OutputType.FILE);
- PHPexcel 判断日期类型
- getOutputStream() has already been called for this response
- FTP错误列表
- ThinkPHP实现支付宝接口功能
- win7安装omnetpp-4.6
- ThinkPHP邮件发送函数