Hallo an alle,
obwohl ich das richtige Ergebnis bekommen habe, zeigt der compiler mir dass ich etwas falsch gemacht habe .
Danke im Voraus
LG Amir
package de.codegym.task.task02.task0216;
/*
Die kleinste aus drei Zahlen
*/
public class Solution {
public static int min(int a, int b, int c) {
//schreib hier deinen Code
if(a<=b && b<=c){
return a;
}else if (b<=c && c<=a){
return b;
}
return c;
}
public static void main(String[] args) throws Exception {
System.out.println(min(1, 2, 3));
System.out.println(min(-1, -2, -3));
System.out.println(min(3, 5, 3));
System.out.println(min(5, 5, 10));
}
}