Answer Posted / ashish ranjan
#include<iostream.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
cin>>n;
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(m==sum)
{
cout<<"the given number is amstrong";
}
else
{
cout<<"the given number is not amstrong";
}
getch();
}
| Is This Answer Correct ? | 13 Yes | 10 No |
Post New Answer View All Answers
What is private inheritance?
Define a constructor - what it is and how it might be called (2 methods)?
How can we read/write Structures from/to data files?
how to explain our contribution in the project?
give me an example for testing a program showing the test path .show how the test is important and complex.
Briefly describe a B+ tree. What is bulk loading in it?
Can you please explain the difference between using macro and inline functions?
What is the main purpose of c++?
What are the uses of static class data?
What language does google use?
Is map sorted c++?
What are the advantages of early binding?
Can you Mention some Application of C/C++?
Why do we need c++?
What is endl?