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
What is low level language in simple words?
What is the default width for ouputting a long integer using the insertion operator?
What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack
Explain all the C++ concepts using examples.
When are exception objects created?
How are the features of c++ different from c?
What are separators in c++?
which of the following is not an secondary constant a) array b) real c) union
What is a linked list in c++?
How const int *ourpointer differs from int const *ourpointer?
How long it will take to learn c++?
How do I run a program in notepad ++?
Explain virtual class and friend class.
How do you establish a has-a relationship?
What is conditions when using boolean operators?