import java.util.Scanner;
import java.util.Arrays;
import java.util.Random;

public class Main {

    public static void main(String[] args) {
        int[] arr = new int[100];
        int min = -99;
        int max = 99;
        Random random = new Random();
        for (int i = 0; i < arr.length; ++i) {
            arr[i] = random.nextInt(max - min + 1) + min;
        }
        System.out.print("Array: ");
        System.out.println(Arrays.toString(arr));

        double[] reciprocal = CreateReciprocalFraction(arr);

        System.out.print("Reciprocal: ");
        System.out.println(Arrays.toString(reciprocal));

        int[] allowed = { -5, 0, 10, 42 };
        int count = 0;
        for (int num : arr) {
            for (int allow : allowed) {
                if (num == allow) {
                    count++;
                    break;
                }
            }
        }
        System.out.println("Allowed counter: " + count);

        // if (args.length > 0) {
        //     switch (Integer.parseInt(args[0])) {
        //         case 1: first(args);  break;
        //         case 2: second(args); break;
        //         case 3: third(args);  break;
        //     }
        // }
    }

    public static double[] CreateReciprocalFraction(int[] arr) {
        double[] result = new double[arr.length];
            for (int i = 0; i < arr.length; ++i) {
                result[i] = 1.0 / arr[i];
            }
        return result;
    }

    public static void first(String[] args) {
    }

    public static void third(String[] args) {
        if (args.length == 2) {
            double x = Double.parseDouble(args[1]);
            double y, f;
            if (x <= 1) {
                y = Math.pow(x, 5) + Math.atan(8 * x);
                f = Math.exp(Math.tan(x + 1));
            }
            else if (x > 3) {
                y = 1 / Math.tan(2 * x + 1);
                f = Math.pow(Math.pow(x, 2), 1.0/5.0);
            }
            else {
                y = 5 * x - (1 + Math.pow(3, x));
                f = Math.pow(x, 4) - Math.tan(4 * x);
            }
            System.out.printf("Y: %f\n", y);
            System.out.printf("F: %f\n", f);

        } else {
            System.out.println("No arguments");

        }
    }
}
