編寫一個程序:試用單重循環結構編程實現,求出10個「韓信點兵數」.該數除以3餘2,除以5餘3,除以7餘4.
題目:
編寫一個程序:試用單重循環結構編程實現,求出10個「韓信點兵數」.該數除以3餘2,除以5餘3,除以7餘4.
各位帥哥帥姐,幫幫啦
解答:
Private Sub Command1_Click()
js = 0:i = 0
Do
If (i Mod 3 = 2) And (i Mod 5 = 3) And (i Mod 7 = 4) Then js = js + 1:Print i
i = i + 1
Loop Until js > 10
End Su
添加新評論