### A good answer might be:

It would be useful to have a read integer subroutine.

# Prompt for and Read Integer

The subroutine prompts the user for an integer and reads it in. The integer is returned in $v0. Here is a start on the subroutine:

    # pread -- prompt for and read an integer
    #
    # on entry:
    #    $ra -- return address
    #
    # on exit:
    #    $v0 -- the integer

    pread:
             la    $a0,prompt        # print string
             li    $v0,4             # service 4
             syscall

             li    $v0,5             # read int into $v0
             syscall                 # service 5

             ____  ____              # return

             nop                     # branch delay slot

             .data
    prompt:
             .asciiz "Enter an integer"

### QUESTION 12:

Fill in the blanks.