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 / vinay k bharadwaj

dear frd your ans is wrong.


#include<stdio.h>
#include<conio.h>
void main()
{
int sum=0,n,m,x;
clrscr();
scanf("%d",&n);
m=n;
while(n>0)
{
x=n%10;
n=n/10;
sum=sum+(x*x*x);
}
if(sum==m)
printf("number is armstrong");
else
printf("number is not armstrong");
getch();
}

Is This Answer Correct ?    87 Yes 47 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Will c++ be replaced?

1005


What is the difference between structures and unions?

1025


What is anonymous object in c++?

1040


How do you define a class in c++?

1037


What are the storage qualifiers?

1117


Describe private, protected and public – the differences and give examples.

1138


What does obj stand for?

1103


What are compilers in c++?

1031


Tell me what are static member functions?

1045


Will the following program execute?

997


what is VOID?

1021


what are the characteristics of Class Members in C++?

1002


How to declare an array of pointers to integer?

1092


Can I learn c++ in a week?

1006


What is the latest version on c++?

1102