Monday, September 21, 2015

PRINT STAR PATTERN IN VB.NET USING NESTED FOR LOOP

Above pattern print program is given below -
 Dim row, col, colspace, noofrow As Integer
        noofrow = 15
        For row = 1 To noofrow Step 1
            For colspace = 1 To noofrow - 1 Step 1
                Console.Write(" ")
            Next
            For col = 1 To row Step 1
                Console.Write("*")
            Next
            noofrow -= 1
            Console.Write(vbNewLine)
        Next

0 comments:

Post a Comment