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 is a stack c++?

0 Answers  


What is an orthogonal base class in c++?

0 Answers  


How a new element can be added or pushed in a stack?

0 Answers  


In which header file does one find isalpha() a) conio.h b) stdio.h c) ctype.h

0 Answers  


In which situation the program terminates before reaching the breakpoint set by the user at the beginning of the mainq method?

0 Answers  


Are c and c++ different?

0 Answers  


What is searching? Explain linear and binary search.

0 Answers  


How const functions will be treated by compiler?

3 Answers   Symphony,


Can you explicitly call a destructor on a local variable?

0 Answers  


When we use Abstract Class and when we use Interface?where we will implement in real time?

0 Answers  


Explain about Virtual Function in C++?

0 Answers  


What is an adaptor class or wrapper class in c++?

0 Answers  


Categories