Question 10
AQA Computer Science June 2024 Paper 1C (8525/1C)GCSE2 marks
On the specification
- 10.1
- 3.2 Programming
- 10.2
- 3.2 Programming
Question text
10 Figure 8 shows a VB.NET program. box Figure 8 Sub First(p1 As Integer, p2 As Integer, p3 As Integer) Dim v1 As Integer = p2 + p3 Console.WriteLine(Second(v1, p1)) End Sub Function Second(p1 As Integer, p2 As Integer) As Integer Dim v1 As Integer = p1 + p2 If v1 > 12 Then v1 = v1 + Third(p1) End If Return v1 End Function Function Third(p1 As Integer) As Integer If p1 > 3 Then Return 2 Else Return 0 End If End Function 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]