vb编写九九乘法表,左上三角和右下三角应该咋写呀T-T
4个回答
2015-01-01
展开全部
Private Sub Command1_Click()
Cls
Print "*"
For j = 9 To 1 Step -1
For i = 1 To j
Print Tab(i * 15 - 14); i; "*"; j; "="; j * i;
Next i
Next j
End Sub
Private Sub Command2_Click()
Cls
Print "*"
For j = 1 To 9
For i = 1 To j
Print Tab(i * 15 + 120 - j * 15); i; "*"; j; "="; j * i;
Next i
Next j
End Sub
Private Sub Command3_Click()
Cls
Print "*"
For j = 1 To 9
For i = 1 To j
Print Tab(i * 15 - 14); i; "*"; j; "="; j * i;
Next i
Next j
End Sub
Private Sub Command4_Click()
Cls
Print "*"
For j = 9 To 1 Step -1
For i = 1 To j
Print Tab(i * 15 + 120 - j * 15); i; "*"; j; "="; j * i;
Next i
Next j
End Sub
追问
谢谢!!!能不能尽量写简单一点呢?我不是很能理解。。T^T最好是能按照前面两个command的也是😓
展开全部
你好很高兴为你解答答案是:亲,能否将问题说的更具体些。满意请采纳,谢谢
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
12345678910111213141516171819202122232425262728293031323334353637383940Private Sub Command1_Click() Cls Print "*" For j = 9 To 1 Step -1 For i = 1 To j Print Tab(i * 15 - 14); i; "*"; j; "="; j * i; Next i Print Next jEnd SubPrivate Sub Command2_Click() Cls Print "*" For j = 1 To 9 For i = 1 To j Print Tab(i * 15 + 120 - j * 15); i; "*"; j; "="; j * i; Next i Print Next jEnd SubPrivate Sub Command3_Click() Cls Print "*" For j = 1 To 9 For i = 1 To j Print Tab(i * 15 - 14); i; "*"; j; "="; j * i; Next i Print Next jEnd SubPrivate Sub Command4_Click() Cls Print "*" For j = 9 To 1 Step -1 For i = 1 To j Print Tab(i * 15 + 120 - j * 15); i; "*"; j; "="; j * i; Next i Print Next jEnd Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
要有一个要求达到的目标,是什么样子的?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |