freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

浙江省計算機等級考試二級vb上機練習題(編輯修改稿)

2025-04-21 05:36 本頁面
 

【文章內(nèi)容簡介】 機產(chǎn)生一個[1,100]的任意整數(shù),輸入猜數(shù)后計算機給出提示,如果5次后還沒有猜中就結(jié)束游戲并公布正確答案。 程序如下:Public Sub Guess() Dim R As Integer Dim X As Integer Dim times As Integer Randomize 39。****** 錯誤1 ****** R = Rnd * 100 39。產(chǎn)生一個1100 的任意整數(shù) times = 1 Do X = Val(InputBox(輸入猜數(shù)X)) Select Case X Case R 猜中了 Exit Do 39。***** 錯誤2 ****** Case X R 太大了,繼續(xù)猜! Case Else 太小了,繼續(xù)猜! End Select times = times + 1 39。****** 錯誤3 ****** Loop While times 5 If times 5 Then 猜數(shù)失敗,游戲結(jié)束! 39。****** 錯誤4 ****** 正確答案為 amp。 Str(X) End IfEnd Sub。該模塊中的ArmstrongNumber過程是用于求出1999之間所有的Armstrong數(shù),并打印出來,但不完整,請在橫線上填入必要的內(nèi)容,使其完整。所謂Armstrong數(shù)是指一個數(shù)等于它每位上數(shù)字的立方和。例如:371=3^3+7^3+1^3,那么371就是一個Armstrong數(shù)。 程序如下:Public Sub ArmstrongNumber() Dim armstrong As Integer Dim i As Integer Dim hundred As Integer 39。百位上的數(shù)字 Dim ten As Integer 39。十位上的數(shù)字 Dim one As Integer 39。個位上的數(shù)字 For i = 1 To 999 hundred = 1 ten = 2 one = 3 If 4 Then i。 is armstrong number End If Next iEnd Sub。該模塊中的 CountTo60 過程是用于從一堆一分、二分、五分的硬幣中取出20枚,使其總值為60分,要求輸出取法的數(shù)量及每一種取法的一分、二分、五分的個數(shù)。 程序如下:Public Sub CountTo60() 39。從一堆一分、二分、五分的硬幣中取出20枚,使其總值為60分 39。輸出取法的數(shù)量及每一種取法的一分、二分、五分的個數(shù) Dim one As Integer 39。一分硬幣個數(shù) Dim two As Integer 39。二分硬幣個數(shù) Dim five As Integer 39。五分硬幣個數(shù) Const n = 20 39。總數(shù)20枚 Dim k As Integer 39。取法數(shù)量 k = 0 For one = 1 To n 39。******* 錯誤1 ******** For two = one + 1 To n five = n one two 39。******* 錯誤2 ********* If one + two + five = 60 Then k = k + 1 one=。 one。 two=。 two。 five=。 five End If 39。******* 錯誤3 ******** Next one 39。****** 錯誤4 ****** Next two k=。 kEnd Sub。該模塊中的TJ過程是將一批數(shù)據(jù)中小于零的數(shù)及它們的積打印出來,但不完整,請在橫線上填入必要的內(nèi)容,使其完整。,數(shù)據(jù)的取值范圍為10 ~ 10 之間的隨機數(shù)。 程序如下:Private Const n = 10Private a(1 To n) As Integer39。TJ過程是將一批數(shù)據(jù)中小于零的數(shù)及它們的積打印出來39。數(shù)據(jù)由SCSJ過程產(chǎn)生,數(shù)據(jù)的取值范圍為10 ~ 10 之間的隨機整數(shù)Public Sub TJ() Dim i As Integer Dim t As Single 1 For i = 1 To 10 If 2 Then t = t * a(i) End If Next i T=。 tEnd SubPublic Sub SCSJ() Randomize 原始數(shù)據(jù) Dim i As Integer Dim j As Integer For i = 1 To n 39。隨機產(chǎn)生0或1,為0時取負,為1時取正 j = Int(Rnd * 2) If 3 Then J = 1 a(i) = j * Int(Rnd * (n + 1)) a(i)。 Next i End Sub。該模塊中的Money過程是用于統(tǒng)計一個有7個工作人員的餐廳發(fā)工資所需的100元、50元、10元、5元和1元的票面數(shù),但不完整,請在橫線上填入必要的內(nèi)容,使其完整。 。(工資單位是元) 程序如下:Dim salary(7) As IntegerPublic Sub Money() Dim hundred As Integer, totalhundred As Integer 39。100元票面數(shù)量、總數(shù)量 Dim fifty As Integer, totalfifty As Integer 39。50元票面數(shù)量、總數(shù)量 Dim ten As Integer, totalten As Integer 39。10元票面數(shù)量、總數(shù)量 Dim five As Integer, totalfive As Integer 39。5元票面數(shù)量、總數(shù)量 Dim one As Integer, totalone As Integer 39。1元票面數(shù)量、總數(shù)量 Dim totalsalary As Integer 39。工資總計 Dim i As Integer, temp As Integer totalhundred = 0 totalfifty = 0 totalten = 0 totalfive = 0 totalone = 0 totalsalary = 0 For i = 1 To 7 temp = 1 hundred = Int(temp / 100) temp = 2 fifty = Int(temp / 50) temp = temp fifty * 50 ten = Int(temp / 10) temp = temp ten * 10 five = Int(temp / 5) temp = temp five * 5 one = 3 totalhundred = totalhundred + hundred totalfifty = totalfifty + fifty totalten = totalten + ten totalfive = totalfive + five totalone = totalone + one totalsalary = 4 Next i 共需100元 amp。 Str(totalhundred) amp。 張 共需50元 amp。 Str(totalfifty) amp。 張 共需10元 amp。 Str(totalten) amp。 張 共需5元 amp。 Str(totalfive) amp。 張 共需1元 amp。 Str(totalone) amp。 張 合計 amp。 Str(totalsalary) amp。 元End SubPublic Sub SalaryData() salary(1) = 1398 salary(2) = 1765 salary(3) = 689 salary(4) = 1500 salary(5) = 832 salary(6) = 590 salary(7) = 1200End Sub。該模塊中的 MaxLine 過程用于查找一個5行4列的二維數(shù)組中行平均值最大的行,并將該行所有數(shù)據(jù)調(diào)整到第
點擊復制文檔內(nèi)容
教學教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1