Question 4
AQA Computer Science Specimen Paper 1C (8525/1C)GCSE5 marks
On the specification
- 3.2 Programming
Question text
4 A programmer has written a VB.Net program that asks the user to input two integers and then output which of the two integers is the largest. Complete the program below by filling in the gaps using the items in Figure 3. You will not need to use all the items in Figure 3. Each item in Figure 3 should only be used once. [5 marks] Figure 3 Console.Write num1 num2 output Else < > ElseIf String Double Integer Dim num1 As Integer Dim num2 As Console.Write("Enter a number: ") num1 = Console.ReadLine() Console.Write("Enter another number: ") num2 = Console.ReadLine() If num1 > num2 Then Console.WriteLine(" is bigger.") ElseIf num1 num2 Then Console.WriteLine(" is bigger.") Console.WriteLine("The numbers are equal.") End If