Answer Posted / ankit,rohit
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m,i;
clrscr();
scanf("%d",&i);
n=i;
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(i==sum)
{
printf("the given number is amstrong");
else
printf("the given number is not amstrong");
}
getch();
}
| Is This Answer Correct ? | 20 Yes | 22 No |
Post New Answer View All Answers
When is the destructor called?
Differentiate between an external iterator and an internal iterator? What is the advantage of an external iterator.
What are the vectors in c++?
What is the best c c++ compiler for windows?
What are static and dynamic type checking?
List the features of oops in c++?
What apps are written in c++?
List the issue that the auto_ptr object handles?
What is implicit conversion/coercion in c++?
Why are pointers not used in c++?
Is c++ a difficult language?
What is c++ vb?
Explain stack unwinding.
What does extern mean in a function declaration in c++?
Is sorted c++?