2a) (30pts) Write MARIE assembly to do this program,using iteration and if/then/else. You will use two data values, one called NUM, initialized to 5. And one called RESLT, that stores the result of the calculation, initialized to zero. You will also need some other variables (your figure out).
CTRL = 0
FOR I = 0 to 5
If CTRL == 0
RESLT = RESLT + NUM
CTRL = CTRL + 1
ELSE
RESLT = RESLT + RESLT
CTRL = CTRL -1
2b) (20pts) “Play Computer”to execute your program virtually (logically on paper) to show the functioning of your program and to see what the correct answer should be.
2c) (10pts) What is the final value for RESLT?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here