当前位置: 移动技术网 > IT编程>开发语言>C/C++ > [ gczdac ] HDU1000

[ gczdac ] HDU1000

2019年03月07日  | 移动技术网IT编程  | 我要评论

庆祝国庆黑板报,好孩子育儿网,花与蛇小说下载

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

 



如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网