package com.javarush.task.task02.task0217;

/*
Минимум четырех чисел
*/
public class Solution {
    public static int min(int a, int b, int c, int d) {
        //напишите тут ваш код
                  int m;
      if (a < b)
           m = a;
      else
           m = b;

                    int n;
      if (c < d)
           n = c;
      else
           n = d;

                      int o;
      if (m < n)
         o = m;
      else
           o = n;

      return o;


    }

    public static int min(int a, int b) {
        //напишите тут ваш код
                  int y;
      if (a < b)
           y = a;
      else
           y = b;

      return y;

    }

    public static void main(String[] args) throws Exception {
        System.out.println(min(-20, -10));
        System.out.println(min(-40, -10, -30, 40));
        System.out.println(min(-20, -40, -30, 40));
        System.out.println(min(-20, -10, -40, 40));
        System.out.println(min(-20, -10, -30, -40));
    }
}