Computer Science, asked by rishabhkothari9e17dp, 7 months ago

Write a program in java to accept a number entered by the user and check wether it is a armstrong number or not (do this program using for loop)
and please make it easy and understandable

Answers

Answered by ruhi08
2

Answer:

Let's see the java program to check Armstrong Number.

  • class ArmstrongExample{
  • public static void main(String[]args) {
  • int c=0,a,temp;
  • int n=153;//It is the number to check armstrong.
  • temp=n;
  • while(n>0)
  • {
  • a=n%10;
Similar questions