22167 多组数据a+b III
多组数据a+b III
https://ac.nowcoder.com/acm/problem/22167
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
while((cin>>a>>b)&&(a<>0||b<>0))
cout<<a+b<<endl;
}编译错误:您提交的代码无法完成编译
a.cpp:6:25: error: 'a' does not name a template but is followed by template arguments
while((cin>>a>>b)&&(a<>0||b<>0))
^~~
a.cpp:5:9: note: non-template declaration found by name lookup
int a, b;
^
1 error generated.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b;
while((cin>>a>>b)&&(a!=0||b!=0))
cout<<a+b<<endl;
}下面的是对的
基本跟前几题一样
其实只是想给你们看一下不知道在干嘛的我
叮咚买菜工作强度 89人发布