How to write a program in Java to check whether an integer is Armstrong number or not?
Shathana. S.R. Answered question May 29, 2023
Armstrong Number Java Program
- import java.util.Scanner;
- import java.lang.Math;
- public class ArmstsrongNumberExample.
- {
- //function to check if the number is Armstrong or not.
- static boolean isArmstrong(int n)
- {
- int temp, digits=0, last=0, sum=0;
Shathana. S.R. Answered question May 29, 2023
