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;
}

下面的是对的
基本跟前几题一样

其实只是想给你们看一下不知道在干嘛的我

全部评论

相关推荐

不愿透露姓名的神秘牛友
07-09 12:11
点赞 评论 收藏
分享
05-29 20:34
门头沟学院 C++
KarlAllen:得做好直接春招的准备。学历差的话,一是面试要求会比学历好的严格不少,二是就算面试通过了也会被排序。总之暑期和秋招对于学历差的就是及其不友好
无实习如何秋招上岸
点赞 评论 收藏
分享
Rena1ssanc...:对的,要是面评没太烂,勤更新简历等捞就行了,腾讯可以无限复活
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务