confused

how can i write this code
if "a" , "b" and "c"
have the same value then print same value


Something like this:

1
2
3
if (a == b && a == c) {
    std::cout << "They are all the same!" << std::endl;
}


If 'a' equals 'b', and 'a' equals 'c' then 'b' and 'c' must be the same so you don't need to check those values.
so
b will also be equal to c ??
thanks mate :)
Topic archived. No new replies allowed.