Computer Science, asked by tumpadas528, 9 months ago

i need help for this guys​

Attachments:

Answers

Answered by s1268shreyashi7736
0

Answer:

if you mark me as brainiest I answered you tomorrow sure

Explanation:

I have to answer later because tomorrow is my science exam

Answered by Anu1612
0

Answer:

class Armstrong

{

 public static void main()

{

Scanner sc=new Scanner(System.in);

int n,d,copy=0;

double s=0.0;

System.out.println("Enter a no.");

n=sc.nextInt();

copy=n;

while(n>0)

{

d=n%10;

s=s+Maths.pow(d,3);

n=n/10;

}

if(s==copy)

System.out.println(copy+"is Armstrong");

else

System.out.println(copy+"is not armstrong");

}

}

//plz mark me as brainliest and any other this kind of programs if are troubling u ,u can ask me

Similar questions