Hi!

I was just wondering if any one could show me some example of how a function of this would look like?

Heres the description:

Write a program with a minimum of a function, which is used to locate
and after returning x-th smallest number in an integer.
Ex: given that we have an original box with the contents: (8, 54, 62, 110, 299,
73, 1,
75, 12, 42)
With a call like: xth_smallest (MyArray, 4, array_size) would
function returns a value of 42nd

Hi!

I was just wondering if any one could show me some example of how a function of this would look like?

Heres the description:
Write a program with a minimum of a function, which is used to locate and after returning x-th smallest number in an integer. Ex: given that we have an original box with the contents: (8, 54, 62, 110, 299, 73, 1, 75, 12, 42) With a call like: xth_smallest (MyArray, 4, array_size) would function returns a value of 42nd

It is quite easy...
Use some kind of sort function. While doing the sort, count the x-th run of the algorithmus. Sort algorithmus is easy to find on net. Just add there the restriction.

Anyway do your homework alone, I have helped you enough.

This aint a homework (yet?) but for me to examine before my test next week, would really appreciate an snippet of code if I might call it that.

This aint a homework (yet?) but for me to examine before my test next week, would really appreciate an snippet of code if I might call it that.

Ok then add here a sort algorithmus that sort numbers by lowest to highest. Then we can adjust the algorithmus to do what you need. Google for "sorting algorithmus " .