用指针输入/输出一个2行3列的二维数组,要求输出的数据间相隔5个空格
1个回答
2017-04-27
展开全部
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Dim i, j, ji, spaces, kongge As Short
Dim huiche As String
kongge = 0
huiche = Chr(13) + Chr(10)
Label2.Text = ""
For i = 1 To 9
For j = i To 9
ji = i * j
spaces = IIf(ji >= 10, 2, 3)
Label2.Text = Label2.Text & CStr(i) & "×" & CStr(j) & "=" & CStr(ji) & Space(spaces)
kongge = i * 5 + i * 4
Next
Label2.Text = Label2.Text & huiche & Space(kongge)
Next
End Sub
Dim i, j, ji, spaces, kongge As Short
Dim huiche As String
kongge = 0
huiche = Chr(13) + Chr(10)
Label2.Text = ""
For i = 1 To 9
For j = i To 9
ji = i * j
spaces = IIf(ji >= 10, 2, 3)
Label2.Text = Label2.Text & CStr(i) & "×" & CStr(j) & "=" & CStr(ji) & Space(spaces)
kongge = i * 5 + i * 4
Next
Label2.Text = Label2.Text & huiche & Space(kongge)
Next
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询