public class Test { public static void main(String[] args){ printTriangle_1(5); System.out.println("--------------"); printTriangle_2(5); System.out.println("--------------"); printTriangle_3(5); System.out.println("--------------"); printTriangle_4(5);
public class Test { public static void main(String[] args){ for(int i=100;i<1000;i++){ int x =i/100; int y =i/10%10; int z =i%10; if(i==x*x*x+y*y*y+z*z*z) System.out.println(i); } } } /* 153 370 371 407 */