How to write a pseudo_code in c language

I just finish my first course in C language and i have this exercice that i’m trying to solve without success since five weeks. Please can someone help me ?
That is the exercise !

Let i be the index of an element in array A. The algorithm consists in finding the final position
of element A [i] by counting values ​​less than this element. If A [i] is not the right one
place — call k its position in the sorted array—, we exchange A [i] and A [k] and start again
finding the position of the new element at position i. Once there is no more permutation
(k = i), the algorithm continues with i = i + 1. Initially i = 1

pseudo code is supposed to be language-independent, no such thing as “pseudo code in C”.
Not directly helpful to solve your problem but may help to clarify what is really expected.

1 Like