package p08_funkcje.zadania;

public class PierwszeFunkcjeZWynikiem {
    
    static double poleProstokata(double a, double b) {
        return a*b;
    }
    
    static double obwodProstokata(double a, double b) {
        return 2*a + 2*b;
    }
    
    static int max(int a, int b) {
        if(a > b)
            return a;
        else
            return b;
    }
    
    static int max(int a, int b, int c) {
        if(a > b && a > c)
            return a;
        if(b > c)
            return b;
        return c;
    }

    public static void main(String[] args) {
        System.out.println(poleProstokata(3,  4));
        System.out.println(poleProstokata(5,  7.5));
        System.out.println(obwodProstokata(5,  7.5));
        System.out.println();
        System.out.println(max(3, 4));
        System.out.println(max(5, 5));
        System.out.println(max(12, 10, 15));
        System.out.println(max(15, 10, 15));
        System.out.println(max(20, 20, 20));
        System.out.println(max(7, 5, 3));
    }

}
