Answer Posted / saravanan
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
scanf("%d",&n);
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(m==sum)
{
printf("the given number is amstrong");
else
printf("the given number is not amstrong");
}
getch();
}
| Is This Answer Correct ? | 97 Yes | 70 No |
Post New Answer View All Answers
What are arrays c++?
What is function overloading c++?
How will you call C functions from C ++ and vice-versa?
Explain the uses oof nested class?
When should overload new operator on a global basis or a class basis?
What is fflush c++?
Can we use this pointer inside static member function?
Can circle be called an ellipse?
What is the difference between the indirection operator and the address of oper-ator?
What is a singleton c++?
Can member data be public?
Explain terminate() function?
Explain about Garbage Collector?
Is c or c++ more useful?
What is the use of pointer in c++ with example?