Assignemnt #118

Code

//colin hinton
//arm.java
//5th period
//5/9/2016

class arm
{
    public static void main (String [] args)
    {
        int counter = 100;
        for(int hun = 1; hun < 10; hun++)
        {
            for (int ten = 0; ten < 10; ten++)
            {
                for (int one = 0; one < 10; one++)
                {
                    double pos = Math.pow(hun,3) + Math.pow(ten,3) + Math.pow(one,3);
                    if (pos == counter)
                    {
                        System.out.print(counter + " ");
                    }
                    counter++;
                }
            }
        }
    }
}

    

Picture of the output

Assignment 1