求出个位数为6,可以被3整除.且十位数是偶数的三位数共有几个 vb怎么编
求出个位数为6,可以被3整除.且十位数是偶数的三位数共有几个 vb怎么编
Private Sub Command1_Click() Dim x1 As Long, x2 As Long, x3 As Long Dim j As String For x1 = 1 To 9 For x2 = 2 To 8 Step 2 If (x1 + x2 + 6) Mod 3 = 0 Then j = j & "," & x1 * 100 + x2 * 10 + 6 End If Next x2 Next x1 j = Mid(j, 2) MsgBox j End Sub