Question: Write a program in MIPS that computes N! using a loop. Remember N! is the product of all the numbers from 1 to N inclusive,

Write a program in MIPS that computes N! using a loop. Remember N! is the product of all the numbers from 1 to N inclusive, that is 1 x 2 x 3 x (N 1) x N. It is defined as 1 for N = 0 and is undefined for values less than 0.

The program first requests the user to input the value of N (display a prompt first so the user knows what to do). If the input value is less than 0, the program is to display N! undefined for values less than 0 and request input again. If the value input is non-negative, it is to compute N! using a loop.

You are to have your name, and a brief description of the program in comments at the top of your program. + comments on almost every line of code in the program with explanation.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!