Create ascending

A program that, given an array of double, and its size and a second array of double, by this order, copy to the second array the first elements whose value is greater than or equal to the value of each of the elements on your left on the array.

For example, if the input array is < 3, 1, 8, 7, 5, 9, 5, 9, 4, 15, 13, 11 >, then the output array will be < 3, 8, 9, 9.15 >.