c/c++语言开发共享[ gczdac ] HDU1000

地址: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 }

 

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/c-cdevelopment/604934.html

(0)
上一篇 2021年5月13日
下一篇 2021年5月13日

精彩推荐