@@ -0,0 +1,1071 @@
+import java.util.Scanner;%0A%0A/**%0A * This program check if an entered value is prime.%0A **/%0Apublic class Prime_Check %7B%0A    // This is a very inefficient, but easy to write prime check algorithm%0A    public static boolean check_If_Prime(int p) %7B%0A        int i = 2;%0A        boolean m = true;%0A%0A        // If the number is 1 or 0, it's not prime%0A        if (p == 1 %7C%7C p == 0) %7B%0A            return false;%0A        %7D else %7B%0A            while (i %3C p && m == true) %7B%0A                // If the number has a factor, it isn't prime%0A                if (p %25 i == 0) %7B%0A                    m = false;%0A                %7D else %7B%0A                     i++;%0A                %7D%0A            %7D%0A            return m;%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        int z;%0A        System.out.println(%22Input a number greater than one%22);%0A        Scanner m = new Scanner(System.in);%0A        z = m.nextInt();%0A        if (check_If_Prime(z) == true) %7B%0A            System.out.println(z + %22 is prime%22);%0A        %7D else %7B%0A            System.out.println(z + %22 isn't prime%22);%0A        %7D%0A    %7D%0A%7D%0A

Add problem 7 to unit 2