I want to write a program which take input and save the poistions of the array elements in another array.
let if i enter an array
A[0]= 4
A[1]=1
A[2]=2
A[3]=3
now the output array will hold
1
2
3
0
i-e the posistions of the array elements starting from the smallest number.
As 1 is the smallest number and it is on 1 posistion the output array will hold values like this
B[0]=1 //Posistion of the smallest number
B[1]=2 //Posistion of second smallest number
B[2]=3 //and so on
B[3]=0 //as 4 is on 0 posistion so it will be on this location of out //array.
This is the problem any one to solve it.
Awais Ahmad 0 Newbie Poster
Ψmon 2 Light Poster
Lerner 582 Nearly a Posting Maven
cikara21 37 Posting Whiz
cikara21 37 Posting Whiz
Laiq Ahmed 42 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.