Der Titel sagt alles/ The title says it all
package de.codegym.task.task04.task0441;
import java.util.Scanner;
/*
Irgendwie durchschnittlich
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int Zahl1 = scanner.nextInt();
int Zahl2 = scanner.nextInt();
int Zahl3 = scanner.nextInt();
int mittlereZahl = 0;
if (Zahl1 == Zahl2 && Zahl2 == Zahl3) {
System.out.println(Zahl1); }
else if ( (Zahl1 < Zahl3) && (Zahl1 > Zahl2) ) {
mittlereZahl = Zahl1 + mittlereZahl;
System.out.println(mittlereZahl); }
else if ( (Zahl2 < Zahl3) && (Zahl2 > Zahl1) ) {
mittlereZahl = Zahl2 + mittlereZahl;
System.out.println(mittlereZahl); }
else if ( (Zahl3 < Zahl2) && (Zahl3 > Zahl1) ) {
mittlereZahl = Zahl3 + mittlereZahl;
System.out.println(mittlereZahl); }
else if (Zahl1 == Zahl2) {
System.out.println(Zahl1); }
else if (Zahl2 == Zahl3) {
System.out.println(Zahl2); }
else if (Zahl3 == Zahl1) {
System.out.println(Zahl3); }
}
}