解题思路:   

                    c++训练, 与其他输入相比,多了个break跳出循环语句

注意事项:

参考代码:

#include <iostream>
using namespace std;
int main ()
{
	int a,b;
	while (cin>>a>>b){
		if (a==0&&b==0){
			break;
		}
		cout<<a+b<<endl;
	}
	return 0;
}


 

0.0分

0 人评分

  评论区