решил правильно, но не понял зачем последний ретёрн a ? 37 строчка, мы же уже его возращали в 28 строке
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 f) {
if (a <= b && a <= c && a <= d && a <= f){
return a;
} else if (b <= a && b <= c && b <= d && b <= f){
return b;
} else if (c <= b && c <= a && c <= d && c <= f){
return c;
} else if (d <= b && d <= c && d <= a && d <= f){
return d;
} else if (f <= b && f <= c && f <= d && f <= a){
return f;
} else return a;
}
}