I want to writer a program in which i input an array?
let the array i entered is :
4
1
2
3
The prigram can take values and find the positions of the character in the array such that the smallest on 0 position and so on.
The result of the array will be if i start array from 0
1
2
3
0
that means it will find the position of the numbers in the array and display it on the screen
Onlt the position of the numbers is specifying and the position of the numbers.
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
I think that the resulting array is the list of positions that the elements of the first array occupied before being sorted.
For example the min elements of the first array is 10 and it was in position 2, then we have 20 at position 1, 30 at position 3 and 40 at position 0, so (40, 20, 10, 30) -> (0, 1, 2, 3) and (10, 20, 30, 40) -> (2, 1, 3, 0)
Someone please correct me if I'm wrong.
EDIT: I didn't see the other thread - why do some people think so often that quantity necessarily means quality?
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)
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.