Answer Posted / rahul puri
#include<stdio.h>
#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 ? | 48 Yes | 41 No |
Post New Answer View All Answers
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Explain deep copy and a shallow copy?
What kind of problems can be solved by a namespace?
What is the prototype of printf function?
Why can templates only be implemented in the header file?
What are guid? Why does com need guids?
What do you mean by funtion prototype?
How should a contructor handle a failure?
Define vptr.
What is the best way to declare and define global variables?
Explain selection sorting?
What are the different types of polymorphism in c++?
Is c or c++ more useful?
What is the purpose of ios::basefield in the following statement?
Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?