‹ Back to the paper
Question 3(iv)
1 mark
Computer ScienceISC 2018 Computer Science Paper 1Short answerImplementation of algorithms to solve problems
Fill in the blanks marked ?1?, ?2? ... so that the code works.
What is the statement or expression at ?4?
Answer
Answer
$?4? = rev*10$ (i.e. $rev = rev*10 + digit$) - the standard technique to build up the reversed number digit by digit.