1樓:阿龍家庭農場
private sub command1_click()'計算應發工資,text4
text4 = val(text1) + val(text2) - val(text3)
'計算個人所得稅,text5
if val(text4) <= 1000 thentext5 = 0
elseif val(text4) > 1000 and val(text4) <= 3000 then
text5 = (val(text4) - 1000) * 0.15elseif val(text4) > 3000 thentext5 = val(text4) * 0.2end if
'計算實發工資,text6
text6 = val(text4) - val(text5)end sub
2樓:匿名使用者
這樣的問題好像不太難呢,但是快到學期末了,求相同的vb程式的人太多了,不知道為何,是老師沒教好吧,這樣的老師也快下課了。太多的學生都不會,若只是幾個同學不會的話,是學生不努力 ,但是多數同學都不會,老師有責任。至少說明學生沒來上課老師沒有理會。
3樓:
分好少 20分就給你你做
急求vb程式設計**!!!! 5
4樓:數學與計算機程式設計
private sub command1_click()
clsrandomize
dim matrixa() as integer, matrixb() as integer, order
dim i as integer, j as integer
order = inputbox("請輸入方陣的階數n:", "矩陣運算", 5)
if order < 1 or not isnumeric(order) then
msgbox "資料錯誤!", 16
else
redim matrixa(order - 1, order - 1), matrixb(order - 1, order - 1)
for i = lbound(matrixa) to ubound(matrixa)
for j = lbound(matrixa) to ubound(matrixa)
matrixa(i, j) = int(rnd * 10)
matrixb(i, j) = int(rnd * 10)
next j
next i
displaymatrix matrixa, 1
displaymatrix matrixb, 1
matrixoperation matrixa, matrixb, lbound(matrixa), ubound(matrixa)
end if
end sub
private sub displaymatrix(byref a() as integer, digitcapacity as integer)
for i = lbound(a, 1) to ubound(a, 1)
for j = lbound(a, 2) to ubound(a, 2)
if digitcapacity = 0 then
print a(i, j);
else
print format(a(i, j), string(digitcapacity, "0")) & space(1);
end if
next j
next i
end sub
private sub matrixoperation(byref a() as integer, byref b() as integer, lowerbound as integer, upperbound as integer)
dim sunmatrix() as integer
dim differencematrix() as integer
dim productmatrix() as integer
dim i as integer, j as integer, k as integer
redim sunmatrix(lowerbound to upperbound, lowerbound to upperbound)
redim differencematrix(lowerbound to upperbound, lowerbound to upperbound)
redim productmatrix(lowerbound to upperbound, lowerbound to upperbound)
for i = lbound(a) to ubound(a)
for j = lbound(a) to ubound(a)
sunmatrix(i, j) = a(i, j) + b(i, j)
differencematrix(i, j) = a(i, j) - b(i, j)
for k = lbound(a) to ubound(a)
productmatrix(i, j) = productmatrix(i, j) + a(i, k) * b(k, j)
next k
next j
next i
displaymatrix sunmatrix, 2
displaymatrix differencematrix, 0
displaymatrix productmatrix, 3
end sub
5樓:匿名使用者
條件不全面,不知道最終實現什麼
急求VB程式設計
呵呵,估計只有這裡題目會是 1000萬 因為這樣就溢位了,並且老師上課是按1000演示的,我這裡也是1000記錄的。老師筆記 是按1000來的 private sub command1 click dim n,pingfang,diwei as doublefor k 3 to 1000 pingf...
急求VB程式設計答案
private a 1 to 1000 as integer,b 1 to 1000 as integer,n as integer private sub mand1 click text1.text randomize for i 1 to 20 a i int rnd 101 100text1...
一道vb程式設計題目急求答案,一道C 程式設計題目 急求答案
private sub form load text1.left 0 text1.top 0 text1.width me.scalewidth 2 text1.height me.scaleheight 2 command1.left me.scalewidth command1.width co...