你好,我怎么 把vb写的一个正三角形和一个倒三角形连起来

2024-11-24 13:34:19
推荐回答(1个)
回答1:

Private Sub Command1_Click()

  n = CInt(InputBox("N="))

  Print "N="; n

  For i = 1 To n

    Print Tab(n + 1 - i);

 枣差   For j = 1 To 2 * i - 1

      Print "*";

 搏岩猛   Next j

    Print

  Next i

  For i = n - 1 To 1 Step -1

    Print Tab(n + 1 - i);

    For j = 1 To 2 * i - 1

      Print "*";

    Next j

    Print

  Next i      基桥

End Sub