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
Is c++ proprietary?
What are literals in C++?
Who discovered c++?
Carry out conversion of one object of user-defined type to another?
What is a singleton c++?
what are the iterator and generic algorithms.
What is extern c++?
What is the best free c++ compiler for windows?
What are the two main components of c++?
What are files in c++?
Can char be a number c++?
How can a struct in c++ differs from a struct in c?
What is :: operator in c++?
How does list r; differs from list r();?
What is the difference between cin.read() and cin.getline()?