第一题
Sub PRG()
Dim S_COUNT, RC_NO, CR, CC As Integer
RC_NO = 1
For i = 100 To 1000 Step 1
S_COUNT = 0
For j = 1 To i Step 1
If i / j = Int(i / j) Then
S_COUNT = S_COUNT + 1
End If
Next j
If S_COUNT = 2 Then
CR = Int((RC_NO - 1) / 10) + 1
If RC_NO Mod 10 = 0 Then
CC = 10
Else
CC = RC_NO Mod 10
End If
Sheet1.Cells(CR, CC) = i
RC_NO = RC_NO + 1
End If
Next i
MsgBox ("Ò»¹²ÓÐ" & (RC_NO - 1) & "¸öËØÊý")
End Sub
第二题
Sub draw()
For i = 6 To 1 Step -1
Sheet1.Cells(7 - i, 1) = String(i, Chr(Asc(i)))
Next i
End Sub
哦