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
Can non-public members of another instance of the class be retrieved by the method of the same class?
Is c++ a software?
What are the various compound assignment operators in c++?
Does c++ vector allocate memory?
What are c++ data types?
What is class invariant in c++?
How do you remove an element from a set in c++?
How can I improve my c++ skills?
What is virtual table?
Is c++ a good first language to learn?
Can we use struct in c++?
Write a program to interchange 2 variables without using the third one.
Explain Text Manipulation Routines?
Name the operators that cannot be overloaded in C++?
What is set in c++?