Question 10
AQA Computer Science June 2024 Paper 1A (8525/1A)GCSE2 marks
On the specification
- 10.1
- 3.2 Programming
- 10.2
- 3.2 Programming
Question text
10 Figure 8 shows a C# program. box Figure 8 static void First(int p1, int p2, int p3) { int v1 = p2 + p3; Console.WriteLine(Second(v1, p1)); } static int Second(int p1, int p2) { int v1 = p1 + p2; if (v1 > 12) { v1 = v1 + Third(p1); } return v1; } static int Third(int p1) { if (p1 > 3) { return 2; } else { return 0; } } 10.1 State what will be displayed by the Console.WriteLine statement when the subroutine First is called with the values 3, 4 and 4 for the parameters p1, p2 and p3 [1 mark] 10.2 State what will be displayed by the Console.WriteLine statement when the subroutine First is called with the values 3, 4 and 8 for the parameters p1, p2 and p3 [1 mark]