您的位置:首页 > 其它

【HDOJ】 <Problem - 1000> : A+B Problem

2013-02-04 20:09 190 查看
原题地址: [ http://acm.hdu.edu.cn/showproblem.php?pid=1000 ]


代码地址: [ http://download.csdn.net/detail/angryn00b/5053087 ]



Problem Description 

计算 A + B

Input 

每行有2个整数 A 和 B, 并且需处理 EOF

Output

对每个输入都应有对应的每行输出A+B的值

Sample Input 

1 1

Sample Output

2

AC 
#include <iostream>
using namespace std;
int main(void)
{
int A, B;
while (cin >> A >> B)
cout << A+B << endl;
return 0;
}

大家要注意处理EOF
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: