Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write the program form Armstrong no in c++?

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


Please Help Members By Posting Answers For Below Questions

What is private inheritance?

1058


Define a constructor - what it is and how it might be called (2 methods)?

1088


How can we read/write Structures from/to data files?

1085


how to explain our contribution in the project?

3656


give me an example for testing a program showing the test path .show how the test is important and complex.

2887


Briefly describe a B+ tree. What is bulk loading in it?

1284


Can you please explain the difference between using macro and inline functions?

1018


What is the main purpose of c++?

1033


What are the uses of static class data?

1146


What language does google use?

1109


Is map sorted c++?

965


What are the advantages of early binding?

1028


Can you Mention some Application of C/C++?

1027


Why do we need c++?

997


What is endl?

1106