The progarmming language is risc-v, sorry that i will dislike if not written in risc-v and copied from another answer Please also show the screenshot of the 3 test cases Write a function square in...


The progarmming language is risc-v, sorry that i will dislike if not written in risc-v and copied from another answer


Please also show the screenshot of the 3 test cases


Write a function square inRISC-V that takes in an integer n ad returns its square. If n is not positive, then the function returns 0. Save your program as task1.s.


Test cases: (1) n = 3, output: 9 (2) n = 12, output: 144 (3) n = -1, output: 0



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here