@@ -0,0 +1,1188 @@
+import java.util.Scanner;%0A%0A/**%0A * This program creates an array of unique, inputted integers.%0A **/%0Apublic class Array_Distinct_Insert %7B%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(%22Input array size%22);%0A        Scanner m = new Scanner(System.in);%0A%0A        int size = m.nextInt();%0A        int length = 0;%0A%0A        int a%5B%5D = new int%5Bsize%5D;%0A%0A        while (length %3C size) %7B%0A            System.out.println(%22Input value%22);%0A            int input = m.nextInt();%0A%0A            int count = 0;%0A%0A            // Check for duplicates before adding to the array%0A            for (int i = 0; i %3C size; i++) %7B%0A                if (a%5Bi%5D == input) %7B%0A                    count++;%0A                %7D%0A            %7D%0A%0A            // If there are no duplicates...%0A            if (count == 0) %7B%0A                a%5Blength%5D = input;%0A                length++;%0A                System.out.print(%22Array: %22);%0A                for (int i = 0; i %3C length; i++) %7B%0A                    System.out.print(a%5Bi%5D + %22 %22);%0A                %7D%0A                System.out.println();%0A            %7D else %7B%0A                System.out.println(input + %22 is already a value in the array%22);%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Add problem 6 to unit 2