Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 3(ii)

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 ?2?

Answer

Answer

$?2? = f * 10$ (i.e. $s = f*10$) - since $f = num/10$ is num with its last digit removed (integer division), multiplying it back by 10 gives num with its last digit replaced by 0.