# Assignemnt #117, More Number Puzzles

## Code

```    import java.util.Scanner;

public class NumberPuzzle2 {

public static void main(String[] args) {

Scanner k = new Scanner(System.in);

int c;

do {
System.out.println("1) Find two digit numbers <= 56 with sume of digits > 10");
System.out.println("2) Find two digit number minus number reversed which equals sum of digits");
System.out.println("3) Quit\n");

System.out.print(">");
c = k.nextInt();

if (c == 1)
One();
else if (c == 2)
Two();
} while (c != 3);
}

public static void One() {
int n = 0;
for (int x = 1; x <= 5; x++) {

if (x < 5) {
for (n = 0; n <= 9; n++) {
if ((x + n) > 10)
System.out.print("\n" + x + n);
}
}
else {
for (n = 0; n <= 6; n++) {
if ((x + n) > 10)
System.out.print("\n" + x + n);
}
}
n -= 9;
}
System.out.println("\n");
return;
}

public static void Two() {
int n = 0;
for (int x = 1; x <= 9; x++) {

for (n = 0; n <= 9; n++) {
if ((((x * 10) + n) - ((n * 10) + x)) == (x + n))
System.out.print("\n" + x + n + "\n");
}
n -= 9;
}
System.out.println();
return;
}
}

```