Many numbers and sum Learn programming Visual Basic (VB.net)

Lesson:

Arrays, Structures and Strings


Exercise:

Many numbers and sum 15


Objetive:

Create a program which asks the user for several numbers (until he enters "end" and displays their sum). When the execution is going to end, it must display all the numbers entered, and the sum again, as follows:

Enter a number: 5
Sum = 5
Enter a number: 3
Sum = 8
Enter a number: end
The numbers are: 5 3
The sum is: 8


Code:

Imports System
Public Class exercise76
    Public Shared Sub Main()
        Dim numbers As Single() = New Single(999) {}
        Dim entrada As String
        Console.Write("Enter a number: ")
        entrada = Console.ReadLine()
    End Sub
End Class