Question: This in-class exercise is to write a program to test a factorial function. The quantity of N factorial or 1 x 2x 3 x.. x
This in-class exercise is to write a program to test a factorial function. The quantity of N factorial or 1 x 2x 3 x.. x N, is symbolized as N!. The classical recursive definition of N! is N!-N N-1)!. Use a recursive procedure that calculates factorial. Note that 0!-1 by definition. Implement your algorithm using MIPS assembly code. You need to use "$sp", stack pointer register, in your MIPS code. Refer to the examples on pages 98- 102. Your input and output will look like below. Input: Please enter positive integer: 10 Output: The value of factorial of 10 is 3628800
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
