Write mips code to implement the following C++ control structures.

1).Develop a MIPS procedure which will calculate the mean, median, and mode of the array A[n]. you can assume the array is already sorted. Use the stack to pass the address of A and the size n to the procedure, and to return the three results. 2. Write mips code to implement the following C++ control structures. you may use a registers for each variable, but you should declare and initialize all variables needed.