1樓:
dim n1, n2, ztol, tm
private sub ***mand1_click()randomize
da = ""
tm = tm + 1
n1 = int(rnd() * 100)n2 = int(rnd() * 100)ti.caption = n1 & "+" & n2 & "="
end sub
private sub ***mand2_click()pdend sub
sub pd()
if n1 + n2 = val(da) thenmsgbox ("對了")
'再錄點音
,如恭內喜你答對了
ztol = ztol + 25
else
msgbox ("錯誤")
'再錄點音,
如再加油容
ztol = ztol + 0
end if
c1 = "得分:" & ztol
ts.caption = "已做了" & tm & "道"
end sub
private sub da_keydown(keycode as integer, shift as integer)
if keycode = 13 then pdend sub
2樓:匿名使用者
private sub ***mand1_click()randomize
a = int(rnd * 101 + 0)b = int(rnd * 101 + 0)c = inputbox(a & "+" & b & "=?")if c = val(a) + val(b) thenmsgbox "yes"
else
msgbox "no"
end if
end sub
vb:設計乙個100以內加減法運算的計算程式
3樓:匿名使用者
private sub ***mand1_click()text1 = int(rnd() * 99 + 1)text2 = int(rnd() * 99 + 1)text3 = ""
end sub
private sub ***mand2_click()if val(text3) = val(text1) + val(text2) then
label1.caption = "恭喜你回答正確。"
else
label1.caption = "x 正確答案為:" & val(text1) + val(text2)end if
end sub 『***************加法運版算,減法類似權
vb1到100加法運算程式**
4樓:
private sub ***mand_click()sum=0
for i=1 to 100
sum=sum+i
next i
print sum
end sub
VB程式設計急求答案
option explicit dim basesize as singleprivate sub form load basesize label1.fontsizeend sub private sub timer1 timer if label1.fontsize 1.5 100 then l...
急求!一道VB程式設計題謝謝,10道VB題 急求答案!!!謝謝高手了
private sub procmin a as integer,byval amin as integer dim i amin0 for i lbound a to ubound a print a i amin0 a lbound a if a i amin0 then amin a i ne...
VB程式設計「求1到1000以內所有奇數之和」(do while結構)
private sub command1 click dim i as integer dim s as integer s 0 i 0 do while i 1000 i i 1 if i mod 2 1 then s s i end if loop print 計算1至1000之間的奇數之和為 ...