Не самое лучшее решение, но все же должно работать. Проверял на многих числах - все работает. Но компилятор ругается...
package com.javarush.task.task05.task0531;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Совершенствуем функциональность
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(reader.readLine());
int b = Integer.parseInt(reader.readLine());
int c = Integer.parseInt(reader.readLine());
int d = Integer.parseInt(reader.readLine());
int e = Integer.parseInt(reader.readLine());
int minimum = min(a, b, c, d, e);
System.out.println("Minimum = " + minimum);
}
public static int min(int a, int b, int c, int d, int e) {
if (a < b && a < c && a < d && a < e)
return a;
else if (b < c && b < d && b < e && b < a)
return b;
else if (c < d && c < e && c < a && c < b)
return c;
else if (d < e && d < a && d < b && d < c)
return d;
else
return e;
}
}