Code is copied!
WAP to store 'N' different numbers in SDA where 'N' is always odd. Arrange them in such a way that the smallest element should be in the middle position, second smallest element to the left side of it, third smallest to the right side and so on ….. Input : 71, 40, 66, 56, 19, 31, 85, 99, 23, 91, 59 Output : 91, 71, 59, 40, 23, 19, 31, 56, 66, 85, 99 Class members are specified below:- Class name: arrange Data members:- arr [] : integer type size : integer type variable to store size of array Member Functions:- Arrange (int n) : parameterized constructor to initialize n to size Void input() : function to input an array of specified size Void arrange() : to arrange them in such a way that the smallest element should be in the middle position, second smallest element to the left side of it, third smallest to the right hand side and so on ….. Void dsiplay() : function to display the array before and after arrangement Specify the class arrange and also write the main() function.