Hi,
Something goes wrong...
After updating my IntelliJ, the last two tasks mixed up (I updated CodeGym too). When I launch this task to just verify, it lauches the next one. When i launch the last one it launches the program of this one.
Anyway, I write in the console the five numbers and it works perfectly ! even with negative numbers... and here it doesn't work at all...
What am i missing ?
package fr.codegym.task.task05.task0531;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Amélioration de fonctionnalité
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader lecteur = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(lecteur.readLine());
int b = Integer.parseInt(lecteur.readLine());
int c = Integer.parseInt(lecteur.readLine());
int d = Integer.parseInt(lecteur.readLine());
int e = Integer.parseInt(lecteur.readLine());
int minimum = min(a, b, c, d, e);
if (a < b || b < c || c < d || d < e || e < a) {
System.out.println("Minimum = " + minimum);
}
}
public static int min(int a, int b, int c, int d, int e) {
return a < b ? a : b;
}
}