Assignment #115 Number Puzzles I

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Number Puzzles I
    /// File Name: Puzzles.java
    /// Date Finished: 4/21/2016
    
    import java.util.Scanner;
    
    public class Puzzles
    {
    	public static void main( String[] args ) throws Exception
    	{
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.println();
            
    		for ( int x=1; x<=99; x++ )
            {
                for ( int y=1; y<=99; y++ )
                {
                    int z = x+y;
                    int d = x-y;
                    if ( d == 14 && z == 60 )
                    {
                    System.out.println( x + " " + y ); 
                    }
                }
            }
            System.out.println();
    	}
    }
    

Picture of the output

Assignment 1