vb中求100~200之间能被7整除的数 并没行5个数代码怎么写
答案:2 悬赏:60 手机版
解决时间 2021-02-18 20:54
- 提问者网友:喧嚣尘世
- 2021-02-17 23:31
vb中求100~200之间能被7整除的数 并没行5个数代码怎么写
最佳答案
- 五星知识达人网友:掌灯师
- 2021-02-18 00:42
Private Sub Command1_Click()
Dim i As Integer, n As Integer
For i = 100 To 200
If i Mod 7 = 0 Then
Print i;
n = n + 1
If n Mod 5 = 0 Then
Print
End If
End If
Next i
End Sub
Dim i As Integer, n As Integer
For i = 100 To 200
If i Mod 7 = 0 Then
Print i;
n = n + 1
If n Mod 5 = 0 Then
End If
End If
Next i
End Sub
全部回答
- 1楼网友:佘樂
- 2021-02-18 01:44
private sub command1_click()
dim i as integer, c as integer
c = 0
for i = 100 to 200
if i mod 3 = 0 and i mod 5 <> 0 then
print i,
c = c + 1
if c mod 5 = 0 then print
end if
next i
end sub
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯