Computer Science, asked by ArpitaJana, 10 months ago

Uupul. AI ALIUMOT PITC Inver
Write a program in Java to accept a number and check the number is an Armstrong or Not. An Armstrong
number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself.
trana​

Answers

Answered by rohit3136
0

Explanation:

Light art or luminism is an applied art form in which light is the main medium of expression. It is an art form in which either a sculpture produces light, or light is used to create a "sculpture" through the manipulation of light, colours, and shadows. These sculptures can be temporary or permanent, and can exist in two distinctive spaces: indoor galleries, such as museum exhibits, or outdoors at events like festivals. Light art can be an interaction of light within an architectural space. Light artists are those that devote all their creative experimentation to light art, some artists experiment with light and neon signage and use light in their practice.

Answered by sswaraj04
1

Answer:

Explanation:

   import java.util.Scanner;

   public class Armstrong{  

     public static void main(String[] args)  {

         Scanner sc = new Scanner(System.in);

      System.out.println("Enter a number: ");

       int n = sc.nextInt();

       int a,b=0,temp;  

       temp=n;

       while(n>0)  

       {  

       a=n%10;  

       n=n/10;  

       b=b+(a*a*a);  

       }  

       if(temp==b)  

       System.out.println("It's an armstrong number");  

       else  

           System.out.println("It's not armstrong number");  

      }  

   }  

Similar questions