7 In this question, the function INT( \(X\) ) is the largest integer less than or equal to \(X\). For example,
$$\begin{aligned}
& \operatorname { INT } ( 3.6 ) = 3 ,
& \operatorname { INT } ( 3 ) = 3 ,
& \operatorname { INT } ( - 3.6 ) = - 4 .
\end{aligned}$$
Consider the following algorithm.
| Step 1 | Input \(B\) |
| Step 2 | Input \(N\) |
| Step 3 | Calculate \(F = N \div B\) |
| Step 4 | Let \(G = \operatorname { INT } ( F )\) |
| Step 5 | Calculate \(H = B \times G\) |
| Step 6 | Calculate \(C = N - H\) |
| Step 7 | Output C |
| Step 8 | Replace \(N\) by the value of \(G\) |
| Step 9 | If \(N = 0\) then stop, otherwise go back to Step 3 |
- Apply the algorithm with the inputs \(B = 2\) and \(N = 5\). Record the values of \(F , G , H , C\) and \(N\) each time Step 9 is reached.
- Explain what happens when the algorithm is applied with the inputs \(B = 2\) and \(N = - 5\).
- Apply the algorithm with the inputs \(B = 10\) and \(N = 37\). Record the values of \(F , G , H , C\) and \(N\) each time Step 9 is reached. What are the output values when \(B = 10\) and \(N\) is any positive integer?