vb程式設計問題

2022-12-20 23:05:58 字數 786 閱讀 2986

1樓:

private sub command1_click()dim i, j as integer, s as double, n as double

for i = 1 to 100

n = 1

for j = 1 to i

n = n * j

next j

s = s + n

next i

print "1!+2!+......+100!="; send sub

2樓:匿名使用者

private sub command1_click()dim sum as double, k as doubledim i as integer, j as integerk = 1

for i = 1 to 100

for j = i to 2 step -1k = k * j

next

sum = sum + k

k = 1

next

msgbox sum

end sub

3樓:匿名使用者

private sub form1_activateddim s as integer,p as integerfor i=1 to 100

p=1for j=1 to i

p=p*i

next j

s=s+p

next i

print "1!+2!+......+100!=";send sub

vb程式設計問題,VB程式設計問題

設 text1 text2 text3 text4 command1 label1 4個test輸入資料 command1是按鈕 label1顯示內容 我給你寫一個子程式 其它你在工具欄向視窗託就行了,然後把這個子程式複製到 做就ok了 private command1 click dim maxa...

VB程式設計的小問題

拆分 千位 int 數字1 1000 百位 int 數字1 100 mod 10十位 int 數字1 10 mod 10各位 數字1 mod 10 逆序 a int 數字1 1000 b int 數字1 100 mod 10c int 數字1 10 mod 10 d 數字1 mod 10 逆序數 d...

VB程式設計的問題,求助高手

private sub text1 keypress keyascii as integer timer1.enabled falseif keyascii 48 or keyascii 58 then 判斷是否數字 if keyascii 32 or keyascii 13 then 不是數字的情...