Dim s%, a%, b%, c%, d%, e
#, m#For a = 1 To 14 For b = 1 To 14 For c = 1 To 14 For d = 1 To 14 For e = 1 To 14 s = a + b + c + d + e If s <= 45 And s >= 30 And a <> b And a <> c And a <> d And a <> e And b <> c And b <> d And b <> e And c <> d And c <> e And d <> e Then n = n + 1 End If If a <> b And a <> c And a <> d And a <> e And b <> c And b <> d And b <> e And c <> d And c <> e And d <> e Then m = m + 1 End If Next e Next d Next c Next b Next a Print n / m; n; m;
===================================================================================
vb程序,不知错误否,计算机算去吧,就是上面答案