Assignment #118 and Number Puzzles III

Code

    /// Name: Lauren Baird
    /// Period: 7
    /// Program Name: Number Puzzles III
    /// File Name: NumberPuzzles3.java
    /// Date Finished: 1/29/2016
    
    public class NumberPuzzles3
    {
        public static void main( String[] args )
        {
            System.out.println();
            int x, y, z, a, b, c;
            
            for ( x = 1; x <= 9; x++ )
            {
                for ( y = 0; y <= 9; y++ )
                {
                    for ( z = 0; z <= 9; z++ )
                    {
                        a = x*x*x;
                        b = y*y*y;
                        c = z*z*z;
                        int armstrong = a+b+c;
                        int total = (x*100) + (y*10) + z;
                        
                        if ( armstrong == total )
                        {
                            System.out.println( total );
                        }
                    }
                }
            }
            System.out.println();
        }
    }  
    

Picture of the output

Assignment #118