vb怎样把它改成用累加器s求n的个数
n=100000DoWhilen<=999999a=nMod10b=((n-a)/10)Mod10c=((n-b*10-a)/100)Mod10d=((n-c*100-b...
n = 100000
Do While n <= 999999
a = n Mod 10
b = ((n - a) / 10) Mod 10
c = ((n - b * 10 - a) / 100) Mod 10
d = ((n - c * 100 - b * 10 - a) / 1000) Mod 10
If n Mod 7 = 0 And c = 8 And d = 8 Then
Print n
End If
n = n + 1
Loop 展开
Do While n <= 999999
a = n Mod 10
b = ((n - a) / 10) Mod 10
c = ((n - b * 10 - a) / 100) Mod 10
d = ((n - c * 100 - b * 10 - a) / 1000) Mod 10
If n Mod 7 = 0 And c = 8 And d = 8 Then
Print n
End If
n = n + 1
Loop 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询