Answer Posted / ramesh
#include<iostream.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
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();
}
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
How much maximum can you allocate in a single call to malloc()?
what is C++ exceptional handling?
What is c++ try block?
What data encapsulation is in c++?
Is c++ vector a linked list?
Do class method definitions?
What is operator overloading in c++ example?
Which operator cannot overload?
What is the use of map in c++?
What is the use of main function in c++?
What is a node class in c++?
Can you write a function similar to printf()?
What is oops in c++?
Refer to a name of class or function that is defined within a namespace?
What is constructor and destructor in c++?