Answer to Question #195331 in Visual Basic for abcdefna

Question #195331

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



1
Expert's answer
2021-05-19T11:58:05-0400
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.ReadLine()
    End Sub


End Module





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS