Assignment #119 A New Hope

Code

    /// Name: DeeJay Cerezo
/// Period: 7
/// Program Name:  Hope
/// File Name: Hope.java
/// Date Finished: 4/29/2016


public class Hope
{
	public static void main( String[] args ) throws Exception
	{
		System.out.println();

		for ( int i = 1; i < 43; i++)
		{
			for ( int j = 1; j < 43; j++)
			{
				for ( int k = 1; k < 43; k++)
				{
					for ( int l = 1; l < 43; l++)
					{
						if ( (i+j+k+l)==45 && i+2==j-2 && k*2==l/2 && j-2==k*2 )
							System.out.print(" "+i+" "+j+" "+k+" "+l+"\n");
					}
				}
			}
		}

		System.out.println("Good on ya kid");
	}
}






    
    

Picture of the output

Assignment