Write an algorithm, using pseudocode, to input three different numbers, multiply the two larger numbers together and output the result. Use the variables: Number1, Number2 and Number3 for your numbers and Answer for your result.
- (a)Write an algorithm, using pseudocode, to input three different numbers, multiply the two larger numbers together and output the result. Use the variables: Number1, Number2 and Number3 for your numbers and Answer for your result.[5]
- (b)Give two sets of test data to use with your algorithm in part (a) and explain why you chose each set. Test data set 1 Reason Test data set 2 Reason[4]
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2018). The mark or mark type is shown in brackets.
- [1] Use of correct variables
- [1] Input 3 numbers
- [1] Check all 3 input numbers are different
- [1] Attempt to find the largest two numbers input
- [1] Correctly finding the largest two numbers
- [1] Multiply their two largest numbers together and assign to variable
- [1] Output the result of the multiplication
- [1] 7,7,7
- [1] should be rejected as numbers are equal
- [1] 7,8,9
- [1] normal data answer should be 72
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →