Hello,
i have a little problem with the last point of this task. Why is there an error? Thank you in advance!
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
int zahl1 = 0;
if(a < b && a < c) {
zahl1 = a;
}
else if(b < a && b < c ) {
zahl1 = b;
}
else{
zahl1 = c;
}
return zahl1;
}
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));
}
}