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
Will c++ be replaced?
What is the difference between structures and unions?
What is anonymous object in c++?
How do you define a class in c++?
What are the storage qualifiers?
Describe private, protected and public – the differences and give examples.
What does obj stand for?
What are compilers in c++?
Tell me what are static member functions?
Will the following program execute?
what is VOID?
what are the characteristics of Class Members in C++?
How to declare an array of pointers to integer?
Can I learn c++ in a week?
What is the latest version on c++?