Dim j = 0
While j = 0
j = j - 1
Console.Write(“Hello”)
j = j + 1
End While
Question: If this code is executed, How many times will “Hello” be printed out?
The program will display the message "Hello" unlimited times, because variable "j" is never zero.
Comments
Leave a comment