Question: 1. Write a MIPS assembly language program that repeatedly prompts the user for a ZIP code, calculates the sum of all digits then prints out
1. Write a MIPS assembly language program that repeatedly prompts the user for a ZIP code, calculates the sum of all digits then prints out the result. If the input is 0 then the program stops. The sum calculation part must be written in 2 versions: recursive and non-recursive and the results are stored in two memory locations A and B, respectively. The output should be something that shows both calculations:
The sum of all digits using the recursive function is xxxxxx, using the non-recursive function is yyyyy. xxxxxx is taken from memory location A and yyyyy is from memory location B. Obviously, both numbers must be the same.
No input validation is needed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
