
package de.codegym.task.task02.task0217;
/*
Die kleinste aus vier Zahlen
*/
public class Solution {
public static int min(int a, int b, int c, int d) {
int m1;
if (a < b)
m1= a;
else
m1 = b;
int m2;
if (m1 < c)
m2 = m1;
else
m2 = c;
int m3;
if (m2 < d)
m3 = m2;
else
m3 = d;
return m3;//schreib hier deinen Code
}
public static int min(int a, int b) {
int m1;
if (a < b)
m1 = a;
else
m1 = b;
return m1;//schreib hier deinen Code
}
public static void main(String[] args) throws Exception {
System.out.println(min(-20, -10));
System.out.println(min(-20, -10, -30, -40));
System.out.println(min(-20, -10, -30, 40));
System.out.println(min(-40, -10, -30, 40));
}
}