2个回答
展开全部
Option Explicit
Private Sub Command1_Click()
Dim Intval As Integer, Cont As Integer, Intdis As Integer
Intval = 1 '从1开始
Do While Intval <= 100
If Intval Mod 7 = 0 Then
Print Intval,
Cont = Cont + 1
Intdis = Intdis + 1
If Intdis Mod 5 = 0 Then Print '每行显示5个
End If
Intval = Intval + 1
Loop
Print Chr(10) & "100以内一共有" & Cont & "个数被7整除"
End Sub
Private Sub Command1_Click()
Dim Intval As Integer, Cont As Integer, Intdis As Integer
Intval = 1 '从1开始
Do While Intval <= 100
If Intval Mod 7 = 0 Then
Print Intval,
Cont = Cont + 1
Intdis = Intdis + 1
If Intdis Mod 5 = 0 Then Print '每行显示5个
End If
Intval = Intval + 1
Loop
Print Chr(10) & "100以内一共有" & Cont & "个数被7整除"
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询