Answer to Question #283824 in Visual Basic for Alvin

Question #283824

Identify and correct the error(s) in each of the following (you may simply need to add code):


1.Assume that z has been initialized to 50. The values from 0 to 50 should be totaled.


 While (z>=0)

 sum = sum + z


2.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


3.Assume that k is declared as an Integer. The loop should iterate until -1 is input.

 

Do While k <> -1

 InputBox(“Enter a number -1 to quit:”, VB6)

 Loop


4.Assume that y is declared as Variant

 

For y = o.1 To 1.0 step .2

 Print y

 Next .2


5.Assume that the variable testVariable has been declared as Integer

 

Do Loop Not testVariable

 Print “Inside of Loop”

 Until


1
Expert's answer
2022-01-03T10:43:26-0500
Dear Alvin, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

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