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 / astitva srivastava

#include<iostream.h>
#include<conio.h>
void main()
{
int n,r,s=0;
cout<<"enter the no.";
cin>>n;
int b=n;
while(n>0)
{
r=n%10;
n=n/10;
s=s+(r*r*r);
}
if(b==s)
{
cout<<"the no. is armstrong"<<"\n";
}
else
{
cout<<"the no. is not a armstrong no.";
}
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are abstract data types in c++?

935


What is a lambda function c++?

1031


What kind of jobs can I get with c++?

1043


What is c++ namespace?

1143


What is the extension of c++?

926


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

1254


Explain rtti.

1024


Can you please explain the difference between overloading and overriding?

1025


Explain polymorphism?

1031


What is the size of a vector?

1060


What is abstraction c++?

947


What is problem with overriding functions?

1004


To which numbering system can the binary number 1101100100111100 be easily converted to?

1000


What is the use of turbo c++?

1011


How can you quickly find the number of elements stored in a static array? Why is it difficult to store linked list in an array?

937