求帮忙。。对调数。。(菜鸟呼叫高手)
两位数对调数的代码。。。条件(不超过30的数,且不能是20,即是说从11到19,21到29这些数中来)
补充下。。。
Private Sub Command1_Click()
Dim a, b, c, d, sum, i, j As Integer
For i = 11 To 29
a = i Mod 10
b = Int(i / 10)
a = a * 10 + b
For j = 11 To 29
c = j Mod 10
d = Int(j / 10)
c = c * 10 + d
If i + j = c + a Then
Print i & "+" & j & "=" & c & "+" & a
End If
Next j
Next i
End Sub
就是11to29时怎么把20排除在外。。