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

This is an armstrong nuumber You will even find example programs how to compute them.

Answered by VernonDozier 2,218 in a post from

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

Fairly straight-forward.

1. Declare an integer array of …

## All 5 Replies

This is an armstrong nuumber You will even find example programs how to compute them.

can you please explain whats my problem statement is?

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

Fairly straight-forward.

1. Declare an integer array of size 10.
2. Find the ten lowest Armstrong numbers. See link.
3. Put them in the array from step 1.
4. Display them (I added this step, but seems like common sense).
5. You're done.

See the list of Armstrong numbers at Wikipedia. Check against the list to make sure you have the right answer.

ok how many numbers should be initialized from the user? i.e user will be asked how many values? then the program will check the Armstrong numbers and store the armstrong number in ascending order into array?

>>ok how many numbers should be initialized from the user?
According to the instructions you posted -- none of them. Just create an array of 10 elements and initialize them with the first 10 Armstrong numbers. No keyboard entries needed. You are trying to make this more difficult than it really is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.