Assignemnt #118 and armstrong
Code
///Name: Luke Shin
///Period: 7
///Project Name: armstrong
///File Name: armstrong.java
///Date: 03/23/2016
public class armstrong{
public static void main(String[] args){
System.out.println();
for (int a = 0; a < 10; a++)
{
for ( int b = 0; b < 10; b++)
{
for (int c = 0; c < 10; c++)
{
if ( (a*100 + b*10 + c) == Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3) )
{
System.out.print(a);
System.out.print(b);
System.out.print(c);
System.out.println();
}
}
}
}
System.out.println();
}
}
Picture of the output