Computer Science, asked by ishaansingh9752, 11 months ago

write a program of neon,armstrong,happy number in java using loops (any type )
{urgently needed}

Answers

Answered by dhruvya
0

Answer:

vdhhdfhggddgdggddvgvggdgggddgdggdfdgdgdggfddggdgddhdhduydydururururuuryrururuururur

Answered by Ankit02
0

class Armstrong {

   public static void main(String[] args) {

       int number = 371, originalNumber, remainder, res = 0;

       originalNumber = number;

       while (originalNumber != 0)

       {

           remainder = originalNumber % 10;

           res += Math.pow(remainder, 3);

           originalNumber /= 10;

       }

       if(res == number)

           System.out.println(number + " is an Armstrong number.");

       else

           System.out.println(number + " is not an Armstrong number.");

   }

}

Result :- 371

Similar questions