hd-1095:A+B for Input-Output Practice (VII)
2015-07-22 21:27
681 查看
[align=left]Problem Description[/align]
Your task is to Calculate a + b.
[align=left]Input[/align]
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
[align=left]Output[/align]
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
[align=left]Sample Input[/align]
1 5
10 20
[align=left]Sample Output[/align]
6
30
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
printf("%d\n\n",a+b);
return 0;
}
Your task is to Calculate a + b.
[align=left]Input[/align]
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
[align=left]Output[/align]
For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.
[align=left]Sample Input[/align]
1 5
10 20
[align=left]Sample Output[/align]
6
30
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d%d",&a,&b)!=EOF)
printf("%d\n\n",a+b);
return 0;
}
相关文章推荐
- pureftp、vsftp部署及优化
- lnmp+wordpress: 您的PHP似乎没有安装运行WordPress所必需的MySQL扩展
- PHP常用函数
- PHP libcurl使用总结
- VLC 播放RTP 所需要的SDP文件格式
- php filesize函数是个坑。。。
- PHP编辑器之Komodo Edit的快捷键
- PHP生成唯一订单号
- PHP解决方案@数据读写文本
- php连接mysql的一些方法总结
- Thinkphp model注意事项
- 新手搭建ThinkPHP框架
- PHP基础
- FragmentPagerAdapter与FragmentStatePagerAdapter区别
- PHP 5.3.0以上推荐使用mysqlnd驱动
- mac下搭建php开发环境 phpstorm+php5
- windows php文件下载地址
- PHP时间比较和时间差计算
- ***PHP请求服务curl以及json的解析
- php文件下载