public class Armstrong {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the number to check:");
int n = sc.nextInt();
int num1 = n;
int arm = 0;
while (n != 0) {
int rem = n % 10;
arm = arm + (rem * rem * rem);
n = n / 10;
}
if (num1 == arm) {
System.out.println("it is an armstrong number");
} else
System.out.println("not an armstrong");
}
package com.dain.logics;
import java.util.Scanner;
public class Armstrong { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the number to check:"); int n = sc.nextInt(); int num1 = n; int arm = 0; while (n != 0) {
}