class ArmstrongNumber { public static void main(String[] args) { int num=1563,sum=0,rem=0; int temp=num; while(num>0) { rem=num%10; num=num/10; sum+=(rem*rem*rem); } System.out.println(temp==sum?"armstrong":"not armstrong"); } } Output Read more