MoreNumPuz
Code
import java.util.Scanner;
public class MoreNumPuz
{
public static void main( String[] args ) throws Exception
{
Scanner keyboard = new Scanner(System.in);
int choice, total=0, total1=0, total2=0, num3;
do
{
System.out.println("1. Find two digit numbers <= 56 with sims of digits > 10 " );
System.out.println("2. Find two digit number minus number reversed which equals sum of digit " );
System.out.print("3. Quit: " );
choice = keyboard.nextInt();
if ( choice == 1 )
{
for( int num=0; num < 6; num++ )
{
for( int num1=0; num1 < 10; num1++)
{
total=num+num1;
if ( num==5 && num>6 )
{
}
else if ( total>10)
{
System.out.println( num +""+ num1 );
}
}
}
}
else if ( choice == 2 )
{
for ( int num2=0; num2 < 10; num2++ )
{
for ( num3=0; num3 < 10; num3++ )
{
total2= num3+num2*10;
total1= num2+num3*10;
/*
total1 = total2/10;
total1 = total1%10;
System.out.println(total);
*/
if ( total2-total1 == num2+num3 )
{
System.out.println( total2 );
System.out.println(" " );
}
}
}
}
}while(choice != 3 );
}
}
MoreNumPuz