please DeaR FriEnDs
HelP
aNd PleaSe It's NoT a TeSt
Attachments:
Answers
Answered by
1
Answer:
SEE MY POST AND MARK ME AS BRAINLIEST ❤️❤️✌️✌️
______________________________24112002.
RADHE RADHE....❤️
Attachments:
Answered by
16
Please mark me brainliest.
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.");
}
}
Similar questions