Assignemnt #117 More Number Puzzles

Code

import java.util.Scanner;

public class MoreNumberPuzzles 
{
    public static void main(String [] args)
    {
        Scanner keyboard = new Scanner(System.in);
        
        int a;
        
        do
        {
            System.out.print("\n1) Find two digit numbers <= 56 with sums of digits > 10\n2) Find two digit number minus number reversed which equals sum of digits\n3 Quit\n\n>");
            a = keyboard.nextInt();
            
            if (a == 1)
            {
                System.out.println();
                func1();
            }
            else if ( a == 2)
            {
                System.out.println();
                func2();
            }
            else
                System.out.println("");
        }
                while (a == 1 || a == 2);
    }
            public static void func1()
            {
                for (int x = 1; x < 6; x++)
                    for (int y = 0; y < 10; y++)
                    {
                        if ((x + y > 10) && (x*10 + y < 57))
                            System.out.println(x +" " + y);
                    }
            }
            public static void func2()
            {
                for (int x = 1; x < 10; x++)
                    for(int y = 0; y < 10; y++)
                {
                        if (((x * 10) + y) - ((y*10) + x) == x + y)
                            System.out.println(x + " " + y);
                }
        }
    }
    

Picture of the output

Assignment 1