Answer Posted / vinay k bharadwaj
dear frd your ans is wrong.
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m,x;
clrscr();
scanf("%d",&n);
m=n;
while(n>0)
{
x=n%10;
n=n/10;
sum=sum+(x*x*x);
}
if(sum==m)
printf("number is armstrong");
else
printf("number is not armstrong");
getch();
}
Is This Answer Correct ? | 87 Yes | 47 No |
Post New Answer View All Answers
Explain the differences between private, public and protected and give examples.
Which is not a valid keyword a) public b) protected c) guarded
What does catch(…) mean?
What is the full form of c++?
What is the use of "new" operator?
Explain the use of this pointer?
What is a tree in c++?
What is data binding in c++?
Explain the difference between overloading and overriding?
What are the differences between new and malloc?
Why c++ is faster than java?
What is searching? Explain linear and binary search.
What is a rooted hierarchy?
What is abstraction in c++?
What is virtual base class?