Answer this fast.
give Correct answer. Wrong answer will be reported !!
Attachments:
Answers
Answered by
1
java.util.*
class ArmstrongExample
{
public static void main(String[] args)
{
Scanner in = new Scanner (System.in);
int c=0,a,temp;
System.out.println ("Enter the number')
int n = in.nextInt ();
temp=n;
while(n>0)
{
a=n%10;
n=n/10;
c=c+(a*a*a);
}
if(temp==c)
System.out.println("armstrong number");
else
System.out.println("Not armstrong number");
}
}
Thank you!
Please mark me as Brainliest!
Similar questions
Hindi,
4 months ago
Political Science,
4 months ago
Social Sciences,
9 months ago
English,
1 year ago
Science,
1 year ago