Answer Posted / saravanan
#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
scanf("%d",&n);
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(m==sum)
{
printf("the given number is amstrong");
else
printf("the given number is not amstrong");
}
getch();
}
| Is This Answer Correct ? | 97 Yes | 70 No |
Post New Answer View All Answers
Describe Trees using C++ with an example.
Differentiate between the message and method in c++?
Write a program using merge () function to combine the elements of array x[ ] and y[ ] into array z[ ].
State two differences between C and C++.
Difference between pointer to constant and constant pointer to a constant. Give example.
Explain the differences between list x; & list x();.
What is rtti in c++?
What is the limitation of cin while taking input for character array?
What are function prototypes?
How long will it take to learn programming?
What are the extraction and insertion operators in c++?
What is a forward referencing and when should it be used?
What is singleton class in c++?
What are the various situations where a copy constructor is invoked?
What data encapsulation is in c++?