Всем привет.
Ломаю голову над последним пунктом. Кто-то может подсказать или намекнуть? :)
Заранее спасибо!
package com.javarush.task.task04.task0419;
/*
Максимум четырех чисел
*/
import java.util.*;
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
Scanner sc1 = new Scanner(System.in);
int b = sc1.nextInt();
Scanner sc2 = new Scanner(System.in);
int c = sc2.nextInt();
Scanner sc3 = new Scanner(System.in);
int d = sc3.nextInt();
if (a >= b && a >= c && a >= d)
System.out.println(a);
if (b >= a && b >= c && b >= d)
System.out.println(b);
if (c >= a && c >= b && c >= d)
System.out.println(c);
if (d >= a && d >= b && d >= c)
System.out.println(d);
}
}