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
List down the guideline that should be followed while using friend function.
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
What is a constant reference?
What are compilers in c++?
Why is polymorphism useful?
On throwing an exception by the animal constructor in p = new animalq, can memory leak occur?
What is the equivalent of Pascal's Real a) unsigned int b) float c) char
How does a C++ structure differ from a C++ class?
Arrange Doubly linked list in the ascending order of its integral value and replace integer 5 with 7?
Does c++ have string data type?
Are c and c++ similar?
What is the difference between strcpy() and strncpy()?
What is pointer in c++ with example?
Do you know the use of vtable?
What is the use of register keyword with the variables?