VB.Net program to read a name and print 5 times using the Do Loop While
'VB.Net program to read a name and print 5 times
'using "Do Loop While" loop.
Module Module1
Sub Main()
Dim name As String = ""
Dim count As Integer = 1
Console.Write("Enter Name: ")
name = Console.ReadLine()
Do
Console.WriteLine("{0} ", name)
count = count + 1
Loop While count <= 5
Console.WriteLine()
End Sub
End Module
Output
Enter Name: Shikar Dhawan
Shikar Dhawan
Shikar Dhawan
Shikar Dhawan
Shikar Dhawan
Shikar Dhawan
Press any key to continue . . .
Table of Contents