一個(gè)六位數(shù)n,它的高二位與低二位恰好相同,同時(shí)又能被97整除,如109610、196619等.編寫(xiě)VB程序,統(tǒng)計(jì)所有符合條件的六位數(shù)的個(gè)數(shù). Dim n As Long'六位數(shù) Dim g2 As Integer'高二位 Dim d2 As Integer'低二位 Dim t As Integer'計(jì)數(shù) t=0 n=100000 Do g2=
n\10000
n\10000
①
'取高二位
'取高二位
d2=
nmod100
nmod100
②
'取低二位
'取低二位
Loop Until n>=1000000 Print t ‘備注:loop until 指的是循環(huán)到若條件成立則退出循環(huán).