i need a clue for the last condition?

package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader( new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());//write your code here
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
if(b>a && a>c || c>a && a>b){
System.out.print(a);
}
if(a>b && b>c || c>b && b>a){
System.out.print(b);
}
if(a>c && c>b || b>c && c>a){
System.out.print(c);
}
if(a==b && b==c || c==b && b==a){
System.out.print(a);
}
}
}

a > bequals false thena < bmust be true This is not the case, because is and b are equal, then both of those would be false. This is the problem with your code in that there is no check to see if any 2 of the inputs are equal. Try to enter any 3 digits where 2 are the same and you code will not display anything. Also, line 26 both:a==b && b==candc==b && b==aare the same. You do not need both.