vb编程: 求1000以内所有能被7整除的数的个数

2024-12-25 19:29:48
推荐回答(2个)
回答1:

For i = 1000 To 1 Step -1 If (i Mod 13) = 0 And (i Mod 7) = 0 Then Text1.Text = Text1.Text

回答2:

count=0
For i=1 To 1000
IF i%7==0 Then
count++
Next i