A programmer is developing a game scoring system. The following pseudocode contains a procedure and two functions used to process score adjustments.
procedure CalculateScore(a, b, c)
val = a * b
print(AdjustScore(val, c))
endprocedure
function AdjustScore(p, q)
total = p - q
if total > 15 then
total = total + ExtraBonus(p)
endif
return total
endfunction
function ExtraBonus(r)
if r > 20 then
return 10
else
return 4
endif
endfunction
State the value that will be printed when the procedure CalculateScore is called with the arguments 6, 4, and 5 for the parameters a, b, and c respectively.
131 exam-style questions on AQA GCSE Computer Science Structured programming and subroutines (procedures and functions). Each one has a worked solution and a mark scheme showing where the marks go.