Course Solutions Uncategorized (Solved) : Functions Output Results Using Consolewriteline Function Using C Sortmyarray Write Functio Q28893736 . . . .

(Solved) : Functions Output Results Using Consolewriteline Function Using C Sortmyarray Write Functio Q28893736 . . . .

 

Your functions should output the results using theconsole.WriteLine() function.

USING C#

SortMyArray

Write a function that takes in an array of integers and sortsthe array from smallest to largest. Your function should return anarray with the sorted list and print the list out. You can assumethat the array being passed will always have integers (You do notneed to type check the array). DO NOT USE thebuilt-in array sort function.

var arr1=[-3,8,7,6,5,-4,3,2,1];

SortMyArray(arr1);

[ -4, -3, 1, 2, 3, 5, 6, 7, 8 ]

var test_array=[1,2,3,4,5];

SortMyArray(test_array);

[ 1,2,3,4,5]

var test_array=[];

SortMyArray(test_array);

Cannot sort an Empty Array!

var test_array=[1,-1,-2,2,3,-3,-4,4,5,-5,0];

SortMyArray(test_array);

[ -5,-4,-3,-2,-1,0,1,2,3,4,5]

var test_array=[1, 1, 1, 100, 75, 2, 2, 37, 55, 55];

SortMyArray(test_array);

[1,1,1,2,2,37,55,55,75,100]

Expert Answer


An

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 8 Sketch Graphs F X 37×2 2x 20 G X Xon Set Axes Find Points Intersection 9 Sketch Graphs F Q28643437 . . . .(Solved) : 8 Sketch Graphs F X 37×2 2x 20 G X Xon Set Axes Find Points Intersection 9 Sketch Graphs F Q28643437 . . . .

Can you please give Matlab codes for these.Thanks.<br/><img src="https://media.cheggcdn.com/media%2F172%2F172991f6-ed98-405d-943e-65b8315f5ffd%2Fimage" alt="(8) Sketch the graphs of f x) 37x2 +2x +20 and g(x) xon the same set of axes and find their