Complete the trace table for the subroutine call process(85).
You may not need to use all the rows in the table.
SUBROUTINE process(k)
x ← k
y ← 3
REPEAT
x ← (x - 1) DIV 3
y ← y * 3 - 2
UNTIL x < 4
OUTPUT y
ENDSUBROUTINE
| k | x | y | OUTPUT |
|---|---|---|---|
| 85 | |||
208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.