Hey, I think there is something wrong in my ifs can someone check that, please? Thanks!
package com.codegym.task.task05.task0531;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Improving functionality
*/
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 <= d) && (a <= c) && (a <= e)) {
}
return a;
else if((b <= a) && (b <= d) && (b <= c) && (b <= e)) {
}
return b;
else if((c <= a) && (c <= b) && (c <= d) && (c <= e)) {
}
min = c;
else if((d <= a) && (d <= b) && (d <= c) && (d <= e)) {
}
return d;
else((e <= a) && (e <= b) && (e<=c) && (e<=d)) {
}
return e;
}
}