119

Code

    ///Name: Joshua Bautista
    ///Period: 6
    ///Date: 6/4/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);
                            }
                        }
                    }
                }
            }
        }
    }
    

Picture of the output

Assignment 1