Assignemnt #119 and Number Puzzles IV: A New Hope

Code

    ///name: Mark Katz
    ///period: 6
    ///program name: Number Puzzle IV
    ///file name: NP4.java
    ///date finished: 5/5/16
    
    public class NP4
    {
        public static void main(String[] args)
        {
            for (int a = 0; a < 46; a++)
            {
                for (int b = 0; b < 46; b++)
                {
                    for (int c = 0; c < 46; c++)
                    {
                        for (int d = 0; d < 46; d++)
                        {
                            int sum = a + b + c + d;
                            int eA = a + 2;
                            int eB = b - 2;
                            int eC = c * 2;
                            int eD = d / 2;
                            
                            if (eA == eB && eB == eC && eC == eD && sum == 45)
                            {
                                System.out.println(a + ", " + b + ", " + c + ", " + d);
                            }
                        }
                    }
                }
            }
        }
    }
    Assignment 119