HDOJ 1091 A+B for Input-Output Practice (III)

http://acm.hdu.edu.cn/showproblem.php?pid=1091

acm常见的输入输出类型,就是一种模板,花一点点时间背下来就可以了,


 1 #include<iostream>
 2 using namespace std;
 3 int main (){
 4     int a,b;
 5     while(true){
 6         cin>>a>>b;
 7         if(a==0 && b==0)
 8             break;
 9         cout<<a+b<<endl;
10     }
11     return 0;
12 }

 

posted on 2013-05-02 09:42  wsxjbcy  阅读(165)  评论(0编辑  收藏  举报

导航