@@ -0,0 +1,955 @@
+import java.util.Scanner;%0Aimport java.util.InputMismatchException;%0A%0Apublic class App%7B%0A    public static int readInteger(int prompt)%7B%0A        Scanner scanner = new Scanner(System.in);%0A        while (true)%7B%0A            System.out.printf(%22Enter Numnber # %25d: %22, prompt);%0A            try%7B%0A                %0A                int i = scanner.nextInt();%0A                if(i%3C1)%7B%0A                    System.out.printf(%22Sorry %25d is not a positive number. Try again.%5Cn%22, i);%0A                    continue;%0A                %7D%0A                return i;%0A                %7D catch (InputMismatchException e) %7B    %0A                System.out.printf(%22Sorry, but %25s is not a valid integer. Try again.%5Cn%22, scanner.nextLine());%0A                %7D   %0A        %7D%0A    %7D%0A    public static void main (String%5B%5D args)%7B%0A        int sum = 0;%0A        for(int i=1; i%3C=3; ++i)%7B%0A            sum += readInteger(i);%0A        %7D%0A        System.out.printf(%22The sum is %25d %22, sum);%0A        %0A    %7D%0A    %0A%7D

Complete function. Closed #12.