Suppose we have three numbers. Now let's imagine that they are not numbers, but people ... Actually, never mind about that. We don't need to make this weird. Let's just check if there is at least one pair of identical numbers among the three. If there is, we'll display it on the screen. And if the three numbers are the same, we'll display all three.
Do we have a pair?
- 4
Locked
Comments (12)
- Popular
- New
- Old
You must be signed in to leave a comment
Ozkin
4 November 2022, 01:57
1.the order is Priority
2.use print dont println
0
hidden #10627273
29 June 2021, 22:24
Why the last requirement point in my solution is not correct?
0
Hemel
12 June 2021, 11:47
For anyone getting stuck with all three numbers not showing up, the order matters.
Can anyone help me understand the difference between
else if (....){
System.out....
}
vs
else {
if (...) {
System.out...
}
0
Oliver Tookey
19 September 2020, 17:46
I am stumped. This is what I have for comapring all three numbers but it doesn't work. The other conditions work fine. I thought it would be easy. What am I missing?
if((nOne==nTwo)&&(nTwo==nThree))
System.out.println(nOne +" " + nTwo +" " + nThree);
else if .......
0
Jurabek Kuralbaev
8 June 2020, 11:14
Hi all,
Please help me with this task. Am I missing smth. or did I do wrong smth? The program gives me error!
0
sai priyanka gurajada
19 November 2019, 16:06
Can we create static method inside a static method ?
0
Roman
20 November 2019, 05:49
https://stackoverflow.com/questions/5388584/does-java-support-inner-local-sub-methods
0
Maarten Bakker
28 September 2019, 20:12
Scanner comes in handy in this one, more convenient than parsing strings from BufferedReader to Ints.
0
Mike McKenna
25 June 2019, 01:38
i found intelli J very helpful in making code easier to read. also great learning tool .
0
xfirab
30 March 2019, 15:52
thanks
0
Molchyn
25 March 2019, 17:53
1. Enter three integers.
2. First, check if the three numbers are equal, display them on the screen.
3. And two checks for equality two numbers, display them on the screen
Yes, we do not forget for the command "return", which terminates the conditional statement..
+2
Roman Grygorczuk
31 October 2020, 10:20
order does the job here
+1