Category Archives: Algorithm Specification

2014 – Q16 (c) – (i)

Jack has been asked to write a program to calculate the potential profit in a soft drinks business. The program will store the costs involved in producing and selling one litre of each drink.

Jack adapts the program to ensure that water cost can only be entered as always greater than or equal to £0.10 and less than or equal to £0.50 per litre.

State the standard algorithm that is used to ensure that data entered is acceptable. (1)

Answer

2014 – Q14

Employees can only access their company network if they enter a correct username and password. A validation program is being developed and will run each time an employee logs on.

An extract of pseudocode from the program is shown below.

2014 - Q14

An error is noticed when the program is tested.

(a) Identify the line containing a logic error. (1)

(b) State how this error should be corrected. (1)

Answer