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 the various arithmetic operators in c++?
What is a forward referencing and when should it be used?
what do you mean by volatile variable?
What are static variables?
What is ifstream c++?
What are guid?
Why c++ is called oop?
Can we inherit constructor in c++?
Can you please explain the difference between using macro and inline functions?
What are shallow and deep copies?
Why do we need c++?
What are compilers in c++?
Explain shallow copy?
When does the c++ compiler create temporary variables?
Does c++ cost money?