If the array entered was:
40
20
10
30
I think the output should be:
2
1
3
0
Does it look like I understood the what the program is supposed to do?
I will not just solve your problem. I will help YOU solve your problem.
If you're writing a program, it will need to do the following:
1) Accept the user input for the array
2) Generate the output array
3) Display the output array
Have you written anything yet?
If so, which parts have you addressed?
Murtan
Practically a Master Poster
671 posts since May 2008
Reputation Points: 344
Solved Threads: 116
I don't get it. How do you go from "40 20 ..." to "2 1 3 0" ?
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
I was trying to understand what he wanted to accomplish so I restated the problem. It did appear to me that the output array was an index into the the original array, but I wanted the original poster to confirm my understanding.
(If there's another thread, I didn't see it either -- sigh)
Murtan
Practically a Master Poster
671 posts since May 2008
Reputation Points: 344
Solved Threads: 116