(Solved):
Write a complete MIPS program that implements the algorithm below (code shown is C++ ). - AC ...
Write a complete MIPS program that implements the algorithm below (code shown is C++ ). - A?C and Z must be integer words in memory, both when the program begins and when the program ends. In between, they can be stored in registers. - Include two screenshots of the MIPS memory panel (data tab): one before your program runs, and one after your program finishes. Put the memory panel in Decimal mode (Right-Click), so it is easy to see memory values. In the after-execution capture, circle the memory location (not register) that contains the final calculated value of Z. - During grading, I will change the values of A, B and C to check the functioning of your code int main() int A=10; int B=15; int C=6; int Z=0; if (A>B?Clk5)Z=1; else if (((A>B)&&((C+1)==7)))Z=2; int main() I int A=10; int B=15; int C=6; int Z=0; if(A > B ?Clk 5) Z=1; else if (!((A>B)&&((C+1)==7)))Z=2; else Z=3; switch(Z) \{ case 1: z=?1 case 2: Z?=?2; case 3: Z - = -3; break; default: Z=0; break; } cout ?<"Z="<<Z; \}