118

Code

    ///Name: Joshua Bautista
    ///Period: 6
    ///Date: 6/4/16
    
    public class NP3
    {
        public static void main(String[] args)
        {
            for (int a = 1; a < 10; a++)
            {
                for (int b = 0; b < 10; b++)
                {
                    for (int c = 0; c < 10; c++)
                    {
                        int number = (100 * a) + (10 * b) + c;
                        int total = (a * a * a) + (b * b * b) + (c * c * c);
                        
                        if (number == total)
                        {
                            System.out.println(a + "" + b + "" + c);
                        }
                    }
                }
            }
        }
    }
    

Picture of the output

Assignment 1