Exercise
Repeat until 0 (Use Do While)
Objetive
Write a Visual Basic (VB.Net) program that asks the user for a number "x" and displays 10*x. The program must repeat the process until the user enters 0, using "do-while".
Code
Imports System
Public Class Program
Public Shared Sub Main()
Dim x As Integer
Do
Console.Write("Enter a number (0 to stop): ")
x = Convert.ToInt32(Console.ReadLine())
If x <> 0 Then
Console.WriteLine("10 * " & x & " = " & (10 * x))
End If
Loop While x <> 0
End Sub
End Class