public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String A = reader.readLine(); int a = Integer.parseInt(A);
String B = reader.readLine(); int b = Integer.parseInt(B);
String C = reader.readLine(); int c = Integer.parseInt(C);
String D = reader.readLine(); int d = Integer.parseInt(D);
if(a>=b && a>=c && a>=d){System.out.println(a);}
else if(c>=a && c>=b && c>=d){ System.out.println(c); }
else if(d>=a && d>=b && d>=c){ System.out.println(d); }
//напишите тут ваш код
}
}
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String A = reader.readLine(); int a = Integer.parseInt(A);
String B = reader.readLine(); int b = Integer.parseInt(B);
String C = reader.readLine(); int c = Integer.parseInt(C);
String D = reader.readLine(); int d = Integer.parseInt(D);
if(a>=b && a>=c && a>=d){System.out.println(a);}
else if(c>=a && c>=b && c>=d){ System.out.println(c); }
else if(d>=a && d>=b && d>=c){ System.out.println(d); }
//напишите тут ваш код
}
}