## Match the code to the pseudocode

Pseudocode Code
1. Access the routines for the Scanner
2. class Main
3. method main
4. Create the Scanner object for the keyboard
5. Intialize the variables for the sums
6. Initialize number strings
7. Ask the user how many numbers they will enter
8. Ask if a number is even
9. Read in a number typed on the keyboard and store it in a variable
10. Prompt the user to enter a number
11. Add a number to the sum of all even numbers
12. Concatenate a number to the string of all even numbers.
13. Repeat the following code "total" times
14. Increment the counter for how many even numbers have been entered
15. Declare and initialize a variable for the average
16. Calculate an average
17. Display a sum and average
1. public static void main
2. int total = scan.nextInt();
3. System.out.print("Enter the total number of values to enter: ");
4. import java.util.Scanner;
5. if (num % 2 == 0 )
6. int sumEven=0; int sumOdd = 0;
7. int num = scan.nextInt( );
8. Scanner scan = new Scanner(System.in);
9. public class Main
10. sumEven = sumEven + num;
11. for (int n = 1; n<= total; n++){
12. String numberStringEven="";String numberStringOdd = "";
13. if(countOdd > 0) avgOdd = sumOdd / countOdd;
14. System.out.print("Enter number "+ n + ": ");
15. numberStringEven = numberStringEven + num;
16. double avgOdd = 0.0;
17. System.out.println("The total of the odd numbers is " + sumOdd +", the average is " + avgOdd);
18. countEven = countEven + 1;