Getting errors for showing middle and two of three equal requirements!
package com.codegym.task.task04.task0441;
/*
Somehow average
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int numx = 0;
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in));
int num1 = Integer.parseInt(bufferedreader.readLine());
int num2 = Integer.parseInt(bufferedreader.readLine());
int num3 = Integer.parseInt(bufferedreader.readLine());
if(num1 == num2 & num2 == num3)
System.out.println(num2);
else if(num1 == num2)
System.out.println(num2);
else if(num2 == num3)
System.out.println(num2);
else if(num3 == num1)
System.out.println(num2);
else if(num1 > num2 & num2 > num3)
System.out.println(num2);
else if(num1 < num2 & num2 < num3)
System.out.println(num2);
else if(num1 < num2 & num2 > num3)
System.out.println(num2);
else if(num1 > num2 & num2 < num3)
System.out.println(num2);
else if(num1 < num2 & num2 > num3)
System.out.println(num2);
else if(num1 > num2 & num2 < num3)
System.out.println(num2);
}
}