View the step-by-step solution to:

# Write a function that takes an array Arr of size N and returns another array which, rst disregards the numbers greater than a certain threshold (also...

Write a function that takes an array Arr of size N and returns another array which, ﬁrst disregards
the numbers greater than a certain threshold (also a passed parameter), and then stores the
remaining elements of the array Arr ﬁrst in an increasing order and then in a decreasing order
Example: If Arr = {5,4,1,12,0,2} and threshold = 10, the returned array should be =
{O,1,2,4,5,5,4,2,1,0} In the main method, the user is asked to enter the size of array Arr, the value of the threshold, as
well as all the elements of array Arr.

#include &lt;iostream&gt; using namespace std ; int main () {     cout &lt;&lt; "enter the array size: " ;     int... View the full answer

1 comment
• a function deifnition must be written
• SargentRam2969
• Apr 02, 2018 at 4:29pm

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

### -

Educational Resources
• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents