Computer Science, asked by friendsforever7244, 8 months ago

please DeaR FriEnDs
HelP
aNd PleaSe It's NoT a TeSt​

Attachments:

Answers

Answered by Vyomsingh
1

Answer:

SEE MY POST AND MARK ME AS BRAINLIEST ❤️❤️✌️✌️

______________________________24112002.

RADHE RADHE....❤️

Attachments:
Answered by anindyaadhikari13
16

Please mark me brainliest.

<hr/>

import java.util.*;

class x

{

public static void main()

{

Scanner sc=new Scanner(System.in);

System.out.print("Enter the number: ");

int n=sc.nextInt();

int n1=n;

int c=0, s=0;

while(n1!=0)

{

c++;

n1/=10;

}

n1=n;

while(n1!=0)

{

int d=n1%10;

s+=(int)Math.pow(d, c);

n1/=10;

}

if(s==n)

System.out.println(" Armstrong number.");

else

System.out.println("Not an Armstrong number.");

}

}

<hr/>

Similar questions