用VB找出100~200之间能同时被3和5整除的数。
要求:用For…Next循环语句将找出的满足条件的数显示到图片框中。
Dim i As Integer
Dim strOut As String
strOut = ""
For i = 100 To 200
If (i Mod 3 = 0) And (i Mod 5 = 0) Then
strOut = strOut & i & ","
End If
Next
Picture1.print "100-200之间能被3或5整除的数有:"纳拿
Picture1.print strOut '显示不下来的话换行输宽物出慎茄液自己解决下.