Answer Posted / astitva srivastava
#include<iostream.h>
#include<conio.h>
void main()
{
int n,r,s=0;
cout<<"enter the no.";
cin>>n;
int b=n;
while(n>0)
{
r=n%10;
n=n/10;
s=s+(r*r*r);
}
if(b==s)
{
cout<<"the no. is armstrong"<<"\n";
}
else
{
cout<<"the no. is not a armstrong no.";
}
}
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Explain all the C++ concepts using examples.
Is c++ the best programming language?
What flag means?
What is ios :: in in c++?
Which is the best c++ software?
What is fixed in c++?
What are advantages of using friend classes?
Can we use pointers in c++?
What is a c++ class?
What is the use of vtable?
What is dynamic and static typing?
How const int *ourpointer differs from int const *ourpointer?
What is searching?
give me an example for testing a program showing the test path .show how the test is important and complex.
Difference between struct and class in terms of access modifier.