Question: TASK-2 Enter a number and check if the number entered is positive or negative. Use a subroutine to print # subprogram: PrintString # purpose: To

 TASK-2 Enter a number and check if the number entered is

TASK-2 Enter a number and check if the number entered is positive or negative. Use a subroutine to print # subprogram: PrintString # purpose: To print a string to the console # input: $a0 The address of the string to print. # returns: None + side effects: The String is printed to the console. .text PrintString: addi $v0, Szero, 4 syscall jr Sra #subprogram: Exit Algorithm: if ($50 > 0) == 0) 1 print("Number is positive") 1 else print("Number is negative") Hint: You can use following instructions in your code. Sgt Beqz jal

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!