Module IsoTriangle Sub main() Dim n, i, j, k As Integer Console.Write("Enter number of lines: ") n = CInt(Console.ReadLine()) For i = 1 To n For j = 2 To n Console.Write(" ") Next For k = 1 To 2 * i - 1 Console.Write("*") Next Console.WriteLine() n -= 1 Next Console.ReadLine() End Sub End Module
Output
*
***
*****
*******
*********
May you help me produce
ReplyDeleteA
AB
ABC
ABCD
ABCDE
ABCDEF
ABCDEFG
ABCDEF
ABCDE
ABCD
ABC
AB
A