Answer Posted / ashish ranjan
#include<iostream.h>
#include<conio.h>
void main()
{
int sum=0,n,m;
clrscr();
cin>>n;
m=n;
while(n>0)
{
m=n%10;
sum=sum+(m*m*m);
n=n/10;
}
if(m==sum)
{
cout<<"the given number is amstrong";
}
else
{
cout<<"the given number is not amstrong";
}
getch();
}
Is This Answer Correct ? | 13 Yes | 10 No |
Post New Answer View All Answers
What is the full form nasa?
What is array in c++ pdf?
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
How are Structure passing and returning implemented by the compiler?
Which function should be used to free the memory allocated by calloc()?
What is c++ virtual inheritance?
What is the main purpose of c++?
What language is a dll written in?
What is format for defining a structure?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Array base access faster or pointer base access is faster?
How can you say that a template is better than a base class?
Why was c++ made?
What is doubly linked list in c++?
What are the uses of typedef in a program?