追蹤
ˊ-橙色九月-ˊ
關於部落格
  • 32952

    累積人氣

  • 8

    今日人氣

    0

    追蹤人氣

VB13

Dim i As Integer
Dim j As Integer
Dim A(2,2) As Integer
Dim B(2,2) As Integer
Dim S(2,2) As Integer
Open "940305.sm" For Input As #1
Input #1, a(1,1), a(1,2), a(2,1), a(2,2)
Input #2, b(1,1), b(1,2), b(2,1), b(2,2)
Close #1
For i = 1 to 2
For j = 1 to 2
s(i,j)=a(i,j)+B(i,j)
Next
result.text = "[" & s(i,1) & "," & s(i,2) & "]" & vbCrLf
Next
方法二
i = 1
Do while i <=2
j = 1
Do while j <= 2
s(i,j) = a(i,j) + b(i,j)
j = j + 1
Loop
result.text = "[" & s(i,1) & "," & s(i,2) & "]" & vbCrLf
i = i + 1
Loop
方法三
i = 1
Do
j = 1
Do
s(i,j) = a(i,j) + b(i,j)
j = j + 1
Loop while j <= 2
result.text = "[" & s(i,1) & "," & s(i,2) & "]" & vbCrLf
i = i + 1
Loop while i <=2

相簿設定
標籤設定
相簿狀態