#How can I check between 3 numbers?
14 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @polar path! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
By checking two numbers and then two other numbers
Put in java :
If a is equals to b and a is equals to c
System.out.println(firstInt == secondInt && firstInt == thirdInt);
..... and also use if / else as appropriate
We've all been beginners but I was way past that after a day
printEqual(1, 1, 2); Neither all are equal or different?
It's not a matter of Java syntax. Find out what rational steps would lead to this result, and then program a computer to do that with Java
Have a look and guide
if (firstInt != secondInt || firstInt != thirdInt) {
System.out.println("Neither all are equal or different");
}
In the case of all different, you'll need to test all combinations
ok, thanks for being here.