色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

VBA代碼編寫在窗體的文本框TextBox1中輸入不大于9的整數,然后計算其階乘后在文本框TextBox2中輸出,怎么編?

錢斌斌2年前14瀏覽0評論

PrivateSubCommandButton1_Click()

Dima,b1,b2,i,tmp

Setb1=Me.TextBox1

Setb2=Me.TextBox2

a=b1.Text

IfLen(a)=0Thentmp="#Len=0":GoTo1000

IfNotIsNumeric(a)Thentmp="#NotIsNumber":GoTo1000

a=a*1

IfInt(a)<>aThentmp="#notInteger":GoTo1000

Ifa<1Ora>9Thentmp="#"&IIf(a<1,"<1",">9"):GoTo1000

tmp=a

Fori=a-1To2Step-1

tmp=tmp*i

Next

1000:

b2.Text=tmp

EndSub