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++?

Answers were Sorted based on User's Feedback



Write the program form Armstrong no in c++?..

Answer / ankit,rohit

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

Is This Answer Correct ?    20 Yes 22 No

Post New Answer

More C++ General Interview Questions

What jobs can you get with a c++ certification?

0 Answers  


When copy constructor can be used?

4 Answers   Symphony,


Explain register storage specifier.

0 Answers  


Describe the main characteristics of static functions?

1 Answers  


What do you mean by const correctness?

0 Answers  


Differentiate between structure and class in c++.

0 Answers  


Is multimap sorted c++?

0 Answers  


What is do..while loops structure?

0 Answers  


Difference between overloaded functions and overridden functions

0 Answers  


what is smart pointer & use of the smart pointer ???

2 Answers  


What is the purpose of the "delete" operator?

0 Answers  


What is the C-style character string?

0 Answers  


Categories