5.8 · exercise
warm up the registers
Three values are waiting in registers: a, b, and c. Compute (a + b) - c and print it.
The starter loads the three values and prints whatever the result register holds, so all that is missing is the arithmetic in the middle. Two instructions are enough.
what is checked
- the combined result is printed on its own line
- the program exits cleanly
- the subtraction actually happens (no writing the answer in directly)
Specification
args
stdoutprints the expected output
exitexits with the expected code
sourceuses
subsourcecomputes the result (does not hardcode it)
Checked by running your program against expected behavior, never by matching a stored solution.
loading editor...