Assignment #119

Code

    
    ///Name: Cody Swain
    ///Period: 6
    ///Project Name: aNewHope
    ///File Name: aNewHope.java
    ///Date: 5/6/16
    
    
    
    public class aNewHope
    {
        public static void main( String[] args )
        {
            for ( int a = 0; a<45; a++ ){
                for ( int b=0; b<45; b++){
                    for ( int c=0; c<45; c++ ){
                        for ( int d=0; d<45; d++){
                            if ( ( (a+2)==(b-2) && (b-2)==(c*2) && (c*2)==(d/2) ) && ( (a+b+c+d)==45 ) ){
                                System.out.println( a + " " + b + " " + c + " " + d );
                            }
                        }
                    }
                }
            }
        }
    }      
    



    

Picture of the output

Assignment 119