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 do you mean by translation unit in c++?
What is new in c++?
Explain the pure virtual functions?
What is const in c++?
Can we make any program in c++ without using any header file and what is the shortest program in c++.
What is the difference between c++ and turbo c++?
How the keyword struct is different from the keyword class in c++?
Why we use #include conio h in c++?
Is c++ a low level language?
Explain how an exception handler is defined and invoked in a Program.
Can we delete this pointer in c++?
What is a forward referencing and when should it be used?
What is called array?
Why isn't sizeof for a struct equal to the sum of sizeof of each member?
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?