vb使用星号输出一个五行的直角三角形
For i = 1 To 5 Print String(i, "*")Next i
vb用*号 打印输出图形
intRowNumber = 5 '画菱形部分 For i = 1 To intRowNumber If i < intRowNumber \/ 2 Then For j = 1 To intRowNumber - i - 2 strOutput = strOutput + " " 'msgbox里一个星号的宽度是两个空格宽度,所以这里加两个空格,如果用别的方法输出看情况修改 Next j For j = 1 To...
VB里用星号输出平行四边形、正三角、倒三角的程序语句?
二、Sub Command1_Click()Dim i As Integer For i = 1 To 11 Step 2 For m = 11 To i Step -1 Debug.Print "*";Next Print Chr(10) & Space(1 + i \\ 2);Next End Sub
vb用星号打印倒直角三角形求解
Private Sub Command1_Click()For i = 0 To 8 '共打印9行 For j = 1 To i Print " "; '每行上先打印i个空格 Next j For j = 1 To 9 - i Print "*"; '再打印9-i个*号 Next j Print '一行打印结束就换行 Next i End Sub ...
编程三角形怎么画
,如果要运行时输出一个直角三角形的话,那就非常的方便只要第1行做出一个型号,第2行输出两个型号,第3行输出三个型号,然后输出N行,每行输出信号以后换行就可以了。如果是要输出一个金字塔型的三角形。那么在每一行输出之前先输出相应的这么多个空格,然后第1行输出一个型号,第2行输出三个新号。
vb怎样打出“*”号倒三角形来?
Command1_Click()Dim i As Long, j As Long Dim strTemp As String, strXing As String For i = 0 To 3 strXing = ""For j = 1 To (7 - Abs(i) * 2)strXing = strXing & "*"Next strTemp = Space(Abs(i)) & strXing & Space(Abs(i))Print strTemp Next End Sub ...
vb:如何在文本框中用星号打印等腰三角形???
Dim i As Integer Dim j As Integer For i = 1 To 10 Text1.Text = Text1.Text & Space(12 - i) '关键在于这一句 For j = 1 To i Text1.Text = Text1.Text & "*"Next j Text1.Text = Text1.Text & Chr(13) + Chr(10) 'vbCrLf Next i ...
VB 打印星号组成的三角形 设置前景色背景色
'先建个图片框Picture1 然后把下面的程序替换你原来的Command1_click()即可Private Sub Command1_Click() Picture1.Cls r = 1 Do While r <= 5 c = 10 - r s = 1 Do While s <= 2 * r - 1 Picture1.Print Tab(s + c); "*"; s = s + 1 Loop...
怎么用VB星号输出这个形状???、 *** *** *** *** ** *
觉得String(i,"*")不习惯,可以用常规的 For i = 1 To 6 '行数 For j = 1 To 7 - i '列数,随着i变大j变小 Print "*";Next j Print '换行 Next i
怎么用星号输出个直角三角形呀
用for输出一个矩阵的一半就是直角三角