I have 3 arrays A, B and C. i want to sawp these. array B will be initialized by A. now take an element from array C and the index # of B that is according to that element (that we take from C)is swap with the first element of Array B.
for example
array A[1, 2, 3, 4, 5]
B[0, 1, 2, 3, 4] //index # of array B
array B[1, 2, 3, 4, 5] //initialized by array A
array C[2, 4, 6, 8, 10]
now if we take an element 2 from C now the index of B that is equal to this element 2 is taken and swap with the first element of B.
index # 2 of <-> first element of B that is 1 and also save in array B.
please any one can help me to make this code. I'll be very thankful to you.
for example
array A[1, 2, 3, 4, 5]
B[0, 1, 2, 3, 4] //index # of array B
array B[1, 2, 3, 4, 5] //initialized by array A
array C[2, 4, 6, 8, 10]
now if we take an element 2 from C now the index of B that is equal to this element 2 is taken and swap with the first element of B.
index # 2 of <-> first element of B that is 1 and also save in array B.
please any one can help me to make this code. I'll be very thankful to you.
Comment