A+B for Input-Output&n…
2015-12-27 16:54
615 查看
Description
The first line integer means the number ofinput integer a and b. Your task is to Calculate a + b.Input
Your task is to Calculate a + b. The firstline integer means the numbers of pairs of input integers.Output
For each pair of input integers a and b youshould output the sum of a and b in one line, and with one line ofoutput for each line in input.Sample Input
2 1 5 10 20
Sample Output
6 30#include<stdio.h>
int
main(){
int
i,a,b,k;
scanf
(
"%d"
,&i);
for
(k=0;k
{
scanf
(
"%d%d"
,&a,&b);
printf
(
"%d\n"
,a+b);
}
return
0;}
相关文章推荐
- PHPUNIT单元测试
- php链接mysql数据库
- php链接mysql数据库
- thinkphp3.2整合银联手机网页支付
- thinkphp 跨模块调用
- php基本语法
- LNMP 1.1 php编译安装
- thinkphp3.2整合支付宝手机网页支付
- ThinkPHP 自动验证及验证规则详解
- thinkphp3.2实现微信JSAPI支付
- 第四篇 PHP的成长路线
- PHP的json_encode中文被转码的问题
- php学习日记第十一棒(计算器案例)
- php使用odbc执行复杂函数遇到的问题,sql语句直接在sqlserver数据库中运行有结果,使用php总是为空
- php中遍历二维数组的几种方法详解
- PHP环境配置小细节
- php--某个字符在字符串中的位置比较
- PHP字符编码问题-总结
- ThinkPHP 模块与操作
- PHP Cookie实战教程