What to do: please remember to comment each line. 1 Initialize x to be zero 2 Pr
ID: 3621019 • Letter: W
Question
What to do: please remember to comment each line.1 Initialize x to be zero
2 Prompt the user for the next operation (Addition or Subtraction)
3 Prompt the user for the next operand (y).
4 Perform the operation (x + y or x – y depends on the operation selected by
the user), and store back the result to x.
5 Output x in decimal.
6 Go back to step 2 until user input “q” as the next operation, then exit.
• Operations:
• Addition: perform x = x + y (when user input “+”)
• Subtraction: perform x = x - y (when user input “-”)
• quit: (when user input “q”).
• Operands:
• One operand (x) is initialized to be zero (defined in .data), and updated as
the result; the other operand is always provided by the user
• Output:
• Decimal value of the current result (x).
• Include integer multiplication (*) and division (/) operations
-perform x = x * y (when user input “*”), and output the product.
- perform x = x / y (when user input “/”), and output both the
quotient and remainder. In this case, x needs to be updated as the
quotient.