Answer the question
In order to leave comments, you need to log in
How to write a condition under which 3 variables are not equal to each other?
How to write a condition under which 3 variables are not equal to each other?
There are 3 variables hero, smoke and recycle.
I need them to be not all equal to each other, i.e. contained different values. How to describe it in a condition?
This is the code that doesn't work:
smoke != hero && smoke != recycle && recycle != hero
Answer the question
In order to leave comments, you need to log in
a = 1
b = 2
c = 3
if a != b && a != c && b != c
// все данные разные
end
Make the checking function a crutch "If-else". And also. Why do you need this? Explain the reason
Instead of && you can (recommended) just write ","
State the problem in its entirety, otherwise the options above are quite suitable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question