Code
Imports System
Module Program
Sub Main(args As String())
Console.WriteLine("printing a triangled shape using stars")
Dim i, j, g, k As Integer
i = 5
j = 0
g = 0
k = 0
While i >= 0
Console.WriteLine(" ")
While j < i
Console.Write(" ")
j = j + 1
End While
While k <= 5
While g < k
Console.Write("*")
g = g + 1
End While
g = 0
k = k + 1
Exit While
End While
j = 0
i = i - 1
End While
Console.ReadKey()
End Sub
End Module
No comments:
Post a Comment