vb打印 九九乘法表的“右上” 三角,十万火急,跪谢!!

就是:1*1=1 1*2=2....... 2*2=4 2*3=6.... 3*3=9 .... 以此类推......
2024-12-21 12:47:18
推荐回答(4个)
回答1:

妮可的代码很好,就是不是右上三角,我改一下,我没用过Format(I * J, I & "x" & J & "=@@ ")的格式,学习了.

Private Sub Form_Click()
Dim I As Integer, J As Integer
For I = 1 To 9
For J = I To 9
Print Format(I * J, I & "x" & J & "=@@ ");
Next
Print
Print Space(7 * I);
Next
End Sub

回答2:

Private Sub Form_Click()
Dim I As Integer, J As Integer
For I = 1 To 9
For J = I To 9
Print Format(I * J, I & "x" & J & "=@@ ");
Next
Print
Next
End Sub

回答3:

dim I as integer,J as integer
for i= 1 to 9
for j=i to 9
print space (i-1) & i & "*" & j & "=" & i*j;
print
next j
next i

回答4:

cwa9958的可以