ArmStrong

Code

import java.util.Scanner;

public class ArmStrong 
{
    public static void main( String[] args ) throws Exception
    {
        int num1, num2, num3;
        
        
        for( num1=1; num1<10; num1++ )
        {
            for( num2=0; num2<10; num2++ )
            {
                for( num3=0; num3<10; num3++ )
                {
                    if ( num1*100+num2*10+num3==(num1*num1*num1+num2*num2*num2+num3*num3*num3))
                    {
                        System.out.println( num1*num1*num1+num2*num2*num2+num3*num3*num3 );
                    }
                }
            }
        }
    }
}

ArmStrong

Assignment 118