answered By bhjahnavi 0

ARMSTRONG :

Each individual number of a number is cubed and added then the sum must be equal to the given number then it is called as Armstrong.

Each individual number of a number is cubed and added then the sum must be equal to the given number then it is called as Armstrong.

```
/*program for Armstrong*/
#include<stdio.h>
#include<iostream.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
cout<<"enter a number";
cin>>n;
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(m==sum)
{
cout<<"the given number is amstrong";
}
else
{
cout<<"the given number is not amstrong";
}
getch();
}
```

flag

Write A Tutorials

Question tags

Similar questions

Follow this question

Follow c++ category

Question tags

c++
× 1

Asked
**3 years and 5 months ago ago**

Number of Views -298

Number of Answers -1

Last updated

**3 years and 3 months ago ago**

Number of Views -298

Number of Answers -1

Last updated

Similar questions