一个三位数 abc a>b>c 这样的三位数有几个 用VB语言写

问题描述:

一个三位数 abc a>b>c 这样的三位数有几个 用VB语言写

Private Sub Command1_Click()Dim num,i As LongDim a,b,c As IntegerFor num = 100 To 999a = num Mod 10b = (num \ 10) Mod 10c = num \ 100If c > b And b > a Then i = i + 1Next numprint i ' 显示多少个84个En...我问的不是a>b>c吗是呀,一样的,我的c是百位,a是个位.好看就改成如下Private Sub Command1_Click()Dim num, i As LongDim a, b, c As IntegerFor num = 100 To 999 c= num Mod 10 b = (num \ 10) Mod 10 a = num \ 100 If a > b And b > c Then i = i + 1Next numprinti ' 显示多少个84个End Sub