a == b == c? [英] a==b==c ?
本文介绍了a == b == c?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
有一种光滑的方式这样做
#include< iostream>
#include< string>
using namespace std;
int main(){
int a,b,c;
a = b = c = 5;
a == b?b == c?cout<< 所有相同的\ nn:::
}
谢谢
Hi
is there a slick way of doing this
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c;
a = b = c = 5;
a==b?b==c?cout << "all the same\n"::;
}
thanks
推荐答案
(a-b + c == c)
(a-b+c == c)
da ************* @ gmail.com 写道:
(a-b + c == c)
(a-b+c == c)
我认为它应该是
(a-b + c == a)
-
SJ
I think it should be
(a-b+c == a)
-
SJ
sonison.ja ... @ gmail.com写道:
sonison.ja...@gmail.com wrote:
da *********** **@gmail.com 写道:
(a-b + c == c)
(a-b+c == c)
如果a == b,无论c如何都是如此。
This is true if a == b, regardless of c.
我认为它应该是
(a-b + c == a)
I think it should be
(a-b+c == a)
如果b == c,则无论a是多少都是如此。
我根本不知道什么是错的a == b&& b == c。
This is true if b == c, regardless of a.
I don''t see what''s wrong with simply a == b && b == c.
这篇关于a == b == c?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文