First, write a subroutine that will sum the numbers (1+2+3+4+...+N), where the user enters N. Please use the instructions JNS and JumpI for the subroutine and return the result on a memory address.
Then write another subroutine that will multiply two numbers using repeated addition. For example, to multiply 20 and 5, you would need to calculate (20+20+20+20+20). Please use the instructions JNS and JumpI for the subroutine and return the result on a memory address.
Then, write a MARIE assembly program that will calculate (N! = 1 x 2 x 3 x 4 … x N), calling the subroutine that was created in the task above.
Finally, consider the range of inputs and outputs your program and subroutines can work with within the MARIE architecture.
Please see the pseudocode below:
Input N Call subroutine to calculate 1+2+3+4+…+N Output result1
Call subroutine to calculate 1 x 2 x 3 x 4 x … x N
Bid only if you can do it. Start your bid with "Ola". Submission Information will give to person I choose