A concrete mixing recipe uses 3 bags of sand and 2 bags of gravel for every 1 bag of cement used.
The first line of an algorithm that will be used to calculate the amount of sand and gravel required based on the number of cement bags being used is:
cementBags ← USERINPUT
Which of the following lines of code correctly calculates the number of sand bags needed?
sandNeeded ← USERINPUT
sandNeeded ← cementBags * USERINPUT
sandNeeded ← cementBags * 3
sandNeeded ← cementBags * 2
208 exam-style questions on AQA GCSE Computer Science Representing algorithms. Each one has a worked solution and a mark scheme showing where the marks go.