Assignemnt #119 and ANewHope

Code

/// name: Leila Ordukhani
/// period: 6
/// program name: One Hundred and Nine Program
/// file name: ANewHope.java
/// date finished: 5/4/16

import java.util.Scanner;

public class ANewHope
{
    public static void main( String[] args ) throws Exception
    {
    
                for (int a = 1; a < 100; a++)
                for (int b = 1; b < 100; b++)
                    for (int c = 1; c < 100; c++)
                        for (int d = 1; d < 100; d++)
                        {
                            int e = a + b + c + d;
                            
                            if ( e == 45 )
                            {
                                if ( a+2 == b-2 && b-2 == c*2 && c*2 == d/2 )
                                    System.out.println( a + " " + b + " " + c + " " + d );
                            }
                        }
        }
    }
    
  

Picture of the output

Assignment 119