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
Can non-public members of another instance of the class be retrieved by the method of the same class?
What is the main purpose of overloading operators?
Differentiate between realloc() and free().
What are associate containers?
Why should we use null or zero in a program?
What is the difference between mutex and binary semaphore?
In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?
Describe the advantage of an external iterator.
What does new do in c++?
What is scope operator in c++?
Is c or c++ more useful?
Explain the scope of resolution operator.
Define the process of error-handling in case of constructor failure?
What is the protected keyword used for?
What is an adaptor class in c++?