Question 5

AQA Computer Science June 2025 Paper 1C (8525/1C)GCSE8 marks

On the specification

5.1
3.2 Programming
5.2
3.2 Programming
5.3
3.2 Programming
5.4
3.2 Programming
Question text

5 The VB.NET program in Figure 5 gets five numbers and outputs the sum of those box numbers. Figure 5 Dim num1 As Integer = Console.ReadLine() Dim num2 As Integer = Console.ReadLine() Dim num3 As Integer = Console.ReadLine() Dim num4 As Integer = Console.ReadLine() Dim num5 As Integer = Console.ReadLine() Dim total As Integer = num1 + num2 + num3 + num4 + num5 Console.WriteLine(total) 5.1 An integer data type is used in the program in Figure 5. Describe what is meant by a data type. [1 mark] The variables num1, num2, num3, num4 and num5 in Figure 5 have an integer data type. 5.2 Explain why these variables do not have a string data type. [1 mark] 5.3 The program in Figure 5 needs to be changed to use numbers with a fractional part (a real number). State a data type in VB.NET that should be used. [1 mark] 5.4 Rewrite the program in Figure 5 so that it achieves the same result but uses an box iteration structure that contains only one Console.ReadLine()statement. Your answer must be written in VB.NET. You should use meaningful variable name(s) and VB.NET syntax in your answer. The answer grid below contains vertical lines to help you indent your code. [5 marks]