Please assist. I got stock with this task any help is much appreciated. Thanks in advance.
package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
Scanner obj = new Scanner(System.in);
int a = obj.nextInt();
int b = obj.nextInt();
int c = obj.nextInt();
if((a >= b && b <= c) || (b <= a && b >= c)) {
System.out.println(b);
} else if((a <= b && b >= c) || (b >= a && b <= c)) {
System.out.println(b);
} else if((a == b && b == c) || (b == a && b == c)) {
System.out.println(c);
}
}
}