mixamus13
12/23/2019 - 9:52 AM

JavaCore_2_4_8

public class JavaCore_2_4_8 {
    public static void main(String[] args) {
        System.out.println(determineGroup(66));
    }

    public static int determineGroup(int age) {
        if (age >= 7 && age <=13) {
            return 1;
        } else if (age >= 14 && age <=17) {
            return 2;
        } else if (age >= 18 && age <= 65) {
            return 3;
        }
        return -1;
    }
}