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
What is a multiset c++?
Tell me an example where stacks are useful?
What is general format for a prototype?
What is conditions when using boolean operators?
What is #include sstream?
What is anonymous object in c++?
What causes a runtime error c++?
What are the advantages of c++?
What is a far pointer? where we use it?
How many types of classes are there in c++?
What is flush c++?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
Evaulate: 22%5 a) 2 b) 4 c) 0
How do you establish an is-a relationship?
What is meant by const_cast?