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
an operation between an integer and real always yeilds a) integer result b) real result c) float result
What is meant by forward referencing and when should it be used?
What is static function? Explain with an example
What is difference between c++ 11 and c++ 14?
What is the best c++ compiler for windows 10?
What is the use of string in c++?
Why do we need constructors in c++?
What are advantages of c++?
what Is DCS ? what i will get benefit when i did?
Should I learn c or c++ or c#?
How does a copy constructor differs from an overloaded assignment operator?
Is c++ the best programming language?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What is setbase c++?
Explain the auto storage classes in c++.