Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have problem that i want to check enter floating point number is Armstrong or not (see Armstrong number definition on Wikipedia[^]).
Please answer me as soon as possible.....
Posted
Updated 28-Sep-10 3:08am
v2
Comments
Richard MacCutchan 28-Sep-10 8:56am    
Could you clarify your question?

Try it :) :
{
  BOOL bARM(FALSE);
#ifdef _ARM_
  bARM = TRUE;
#endif // ifdef _ARM_
...
}
 
Share this answer
 
Comments
CPallini 28-Sep-10 9:04am    
:-D
Have you ever heard about Google[^] ?
 
Share this answer
 
Given the definition you pointed out, there are precisely zero "floating point" narcissistic numbers. All of the known 88 base 10 narcissistic numbers are integers.

Looking at the math behind this concept, this is ridiculously easy to test for. Though, due to the limitations of Long Integers, you'll need a BigInteger library to handle the largest cases of a positive identification.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900