[ gczdac ] HDU1000
程序员文章站
2022-04-08 19:20:47
地址:http://acm.hdu.edu.cn/showproblem.php?pid=1000 Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to e ......
地址:
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
sample output
2
1.我的第一道acm题,非常非常非常简单的一道题
2.但是我还是卡了
3.原因是没有循环输入输出
4.总结:英语非常重要,稍微一点点偏差,会自闭一天
代码:
1 #include <iostream> 2 using namespace std; 3 int main ( ) 4 { 5 int x,y; 6 while (cin>>x>>y) 7 cout<<x+y<<endl; 8 return 1; 9 }