Answer Posted / roshan patel
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x,y,d;
cout<<"\nEnter the no : ";
cin>>x;
y=x;
int sum=0;
while(y>0)
{
d=y%10;
y/=10;
sum=sum+d*d*d;
}
if(x==sum)
cout<<"\n "<<x<<" is Armstrong ";
else
cout<<"\n"<<x<<" is not Armstrong";
getch();
}
| Is This Answer Correct ? | 17 Yes | 5 No |
Post New Answer View All Answers
What is the use of object in c++?
What is a storage class used in c++?
Briefly describe a B+ tree. What is bulk loading in it?
Define the process of error-handling in case of constructor failure?
What are c++ stream classes?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
give me an example for testing a program showing the test path .show how the test is important and complex.
When there is a global variable and local variable with the same name, how will you access the global variable?
What is null and void pointer?
How would you use the functions memcpy(), memset(), memmove()?
What do you mean by early binding?
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.
How does com provide language transparency?
What are c++ files?