Problem Description

Calculate A + B.

Input

Each line will contain two integers A and B. Process to end of file.

Output

For each case, output A + B in one line.

Sample Input

1 1
2 2
3 3

Sample Output

2
4
6

我的代码:
 #include <stdio.h>
int main()
{
int A,B,sum;
while(scanf("%d%d",&A,&B) != EOF) {
sum=A+B;
printf("%d\n",sum);
}
return ;
}

其他代码:

 #include<stdio.h>
int main()
{
int a, b;
scanf("%d%d", &a, &b);
printf("%d\n",a + b);
scanf("%d%d", &a, &b);
printf("%d\n", a + b);
scanf("%d%d", &a, &b);
printf("%d", a + b);
return ;
}
 #include <iostream>

 using namespace std;

 int main()
{
int a=,b=;
while(cin>>a>>b)
{
cout<<a+b<<endl; } return ;
}

最新文章

  1. MJPhotoBrowser BUG修复
  2. bootstrap源码分析之tab(选项卡)
  3. shell变量判空几种方法
  4. Berkeley 四种产品如何选择?
  5. apache 2.4 针对某个文件限速
  6. Middleware
  7. HDOJ(HDU) 2083 简易版之最短距离(中位数)
  8. 浅谈ThreadPool 线程池
  9. 设计模式多线程方面之Thread-Per-Message 模式
  10. UVALive 6584 Escape (Regionals 2013 &gt;&gt; Europe - Central)
  11. Q &amp; A
  12. Android动态加载入坑指南
  13. 【转载】Sqlserver数据库备份的几种方式
  14. [Codeforces Round #516][Codeforces 1063B/1064D. Labyrinth]
  15. 【Python】随机数random模块randint、shuffle、random、sample、choice、uniform、
  16. Painter&#39;s Problem (高斯消元)
  17. maven安装操作
  18. C++学习(二十一)(C语言部分)之 函数2
  19. iOS中的MVC
  20. WebLogic 12c 修改节点 Managed Server 和 AdminServer 内存方法

热门文章

  1. Python实现类似switch...case功能
  2. 《python基础教程》笔记之 其它语句1
  3. Altium 9中正确的差分对走线方法
  4. keil #pragma disable
  5. Xamarin devexpress datagrid 样式
  6. Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load.
  7. java中jsoup框架解析html
  8. 计蒜客 444 / xtuoj 1024 京东的物流路径(并查集+离线lca)或者 (点分治)
  9. guestfish 修改 image file
  10. go语言的安装和配置,以及包引用