Thread: armstrong problem statement in c++??

  1. #1
    Registered User
    Join Date
    Oct 2010

    Question armstrong problem statement in c++??

    first of all please any one tell me what is a armstrong number.

    i have a problem statement in c++,cant find any logic to work on it.. can any one give me some hints to do it? please also explain my problem statement in simple wordings thats whats my problem statement is.. i cant understand it.. thnx

    Declare an integer array of size 10. Only first ten armstrong numbers can be stored in 0-9 indexes of your array , means Initially you have to find out first ten arm strong numbers and then store it in your array

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jun 2005
    An Armstrong number is equivalent to the sum of each of its digits raised to the number of digits.

    For example, 1634 is an Armstrong number (in base 10) as 1634 = 1^4 + 6^4 + 3^4 + 4^4 where I'm using ^ to represent "to the power of", not the C++ bitwise xor operator.

    As a hint, the value 1 is an Armstrong number (1 equals 1^1).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Switch statement problem
    By jalex39 in forum C Programming
    Replies: 6
    Last Post: 03-08-2008, 04:05 PM
  2. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  3. having problem with string statement during a loop!
    By Hp7130p in forum C++ Programming
    Replies: 5
    Last Post: 04-21-2005, 09:40 AM
  4. If statement re-do problem
    By RoD in forum Windows Programming
    Replies: 5
    Last Post: 09-11-2002, 04:46 PM

Tags for this Thread