Question 2(b)(ii) 2015 · May-June · Paper 23 · 5 marks
Reveal official mark-scheme answer
Official answer for Question 2
Part (b)
(ii)
(ii)
INPUT Amount
Show text version of question
Question 2
Part (b)
(ii)
Bank customers withdraw money from their account at a cash dispenser machine using their bank card. The machine operates as follows:
- it can dispense the following notes:
- the maximum amount for a single withdrawal is $500
o $50 o $20 o $10
When a customer withdraws money, they enter the amount to withdraw. (This must be a multiple of $10).
The machine will always dispense the least possible number of notes.
The following variables are used:
Identifier Data type Description Amount INTEGER Amount to withdraw entered by the user
FiftyDollar INTEGER Number of $50 notes to dispense
TwentyDollar INTEGER Number of $20 notes to dispense
TenDollar INTEGER Number of $10 notes to dispense
Temp INTEGER Used in the calculation of the number of each note required
Question 5
(ii)
Complete the pseudocode.
INPUT .................................................................................................................................. IF Amount > 500 THEN OUTPUT "Refused – amount too large" ELSE ..................................................................................................................................
THEN OUTPUT "Refused - not a multiple of $10" ELSE FiftyDollar Amount DIV 50 Temp .................................................................................................... TwentyDollar .................................................................................... Temp ..................................................................................................... ..................................................................................................................... ENDIF ENDIF
Question 6
Why this question appears here
71% assigned-topic match · Programming › Programming basics
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_s15_qp_23.pdf
