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 / roshan patel

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int x,y,d;
cout<<"\nEnter the no : ";
cin>>x;
y=x;
int sum=0;
while(y>0)
{
d=y%10;
y/=10;
sum=sum+d*d*d;
}
if(x==sum)
cout<<"\n "<<x<<" is Armstrong ";
else
cout<<"\n"<<x<<" is not Armstrong";
getch();
}

Is This Answer Correct ?    17 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of object in c++?

1111


What is a storage class used in c++?

1097


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

1355


Define the process of error-handling in case of constructor failure?

1026


What are c++ stream classes?

1065


Write an algorithm that determines whether or not an almost complete binary tree is a heap.

3935


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

2957


When there is a global variable and local variable with the same name, how will you access the global variable?

1110


What is null and void pointer?

1077


How would you use the functions memcpy(), memset(), memmove()?

1105


What do you mean by early binding?

1077


If you want to share several functions or variables in several files maitaining the consistency how would you share it?

1000


What is the difference between an external iterator and an internal iterator? Describe an advantage of the external iterator.

1073


How does com provide language transparency?

1022


What are c++ files?

1150