Question: Consider the following MIPS variable declarations: LIST: .word 11, 22, 33, 44, 55, 66, 77, 88, 99 LENGTH: .word 9 EVEN: .word 0 ODD: .word
Consider the following MIPS variable declarations: LIST: .word 11, 22, 33, 44, 55, 66, 77, 88, 99 LENGTH: .word 9 EVEN: .word 0 ODD: .word 0 Note that integer variable LENGTH indicates the number of values stored in integer array LIST. Write a program in C++ and assembly language that uses a loop and a selection statement to count the number of even integers and the number of odd integers in the given LIST, and stores these counts in variables EVEN and ODD, respectively. For the declarations shown above, your program should determine that four of the values in LIST are even, and five of the values are odd. Your program should store these counts in variables EVEN and ODD, respectively. Be sure to test and thoroughly debug your program using a lists
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
