Identify and correct the error(s) in the following (you may simply need to add code):
Assume that y and total are declared as Integers
total = 0
Do Until y = -1
Print y
y = InputBox(“Enter a value, value input”)
total = total + y
Loop
Module Module1
Sub Main()
Dim total As Integer = 0
Dim y As Integer = 0
Do Until y = -1
Console.WriteLine(y.ToString())
y = InputBox("Enter a value, value input")
total = total + y
Loop
Console.WriteLine(total.ToString())
End Sub
End Module
Comments
Leave a comment