2.三角形1

Dim i, j, k, 輸入值1, 輸入值2 As Integer

Console.Write("請輸入一個數 : ")

輸入值1 = Console.ReadLine

Console.Write("請輸入一個數 : ")

輸入值2 = Console.ReadLine

For i = 1 To 輸入值1 '巢狀迴圈

' Console.Write(i)

' For k = 1 To 輸入奇數 - i

'Console.Write(" ")

'Next

Console.Write("i=" & i & "-->")

For j = 1 To i '印出* 印出的數量:輸入值2

Console.Write("*")

Next

Console.WriteLine("") '換行

Next

Console.ReadKey()