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

正文內(nèi)容

vb_編程練習(xí)(答案)-資料下載頁(yè)

2025-01-14 21:50本頁(yè)面
  

【正文】 Private Function EnyStr(strI As String) As String39。********** Program ********* Dim i As Integer Dim strp As String, strT As String, iA As String Dim nl As String i = 1: strp = nl = Len(RTrim(strI)) Do While (i = nl) strT = Mid$(strI, i, 1) 39。取第i個(gè)字符 If (strT = A And strT = Z) Then iA = Asc(strT) + 5 If iA Asc(Z) Then iA = iA 26 strp = strp + Chr$(iA) ElseIf (strT = a And strT = z) Then iA = Asc(strT) + 5 If iA Asc(z) Then iA = iA 26 strp = strp + Chr$(iA) Else strp = strp + strT End If i = i + 1 Loop EnyStr = strp39。********** End *************End FunctionPrivate Sub Form_Load() Show Print EnyStr(abc def xyz)End Sub39。39。題目:編寫(xiě)函數(shù)fun,函數(shù)的功能是:計(jì)算兩個(gè)正整數(shù)的最大公約數(shù),并顯示。39。如:兩個(gè)數(shù)為120,結(jié)果顯示5 39。 要求使用Do ... Loop語(yǔ)句來(lái)實(shí)現(xiàn)。39。Private Function fun(m As Integer, n As Integer) As IntegerDim r%If m n Then r = m: m = n: n = r39。**********Program**********Do r = m Mod n If r = 0 Then Exit Do m = n n = rLoopfun = n39。********** End **********End FunctionPrivate Sub Form_Load() Show Print fun(15, 10)End Sub39。39。題目:(事件)單擊窗體。39。 (響應(yīng))一球從100米高度自由落下,每次落地返回原高度的一半,求第10次落地時(shí),共經(jīng)過(guò)多少米?并將結(jié)果在窗體上輸出。 39。Private Sub Form_Click()Dim s As Single39。********* Program *************Dim j, i As Integers = 0j = 100For i = 2 To 10 j = j / 2 s = s + 2 * jNexts = 100 + sPrint s39。********* End ***************End Sub39。39。題目:編寫(xiě)函數(shù)fun,函數(shù)的功能是:計(jì)算并輸出給定整數(shù)n的所有因子之和(不包括1與自身)。規(guī)定n的值不大于1000? 例如:n的值為855時(shí),應(yīng)輸出704。39。Private Function Fun(n As Integer) As Long39。********** Program ********* Dim s, i As Integer For i = 2 To n 1 If n Mod i = 0 Then s = s + i End If Next Fun = s39。********** End *************End FunctionPrivate Sub Form_Load() Show Print Fun(855)End Sub39。39。題目:將一個(gè)十進(jìn)制整數(shù)m轉(zhuǎn)換成 → r (2-16)進(jìn)制字符串。39。方法:將m不斷除 r 取余數(shù),直到商為零,以反序得到結(jié)果。39。 下面寫(xiě)出一轉(zhuǎn)換函數(shù),參數(shù)idec為十進(jìn)制數(shù),ibase為要轉(zhuǎn)換成數(shù)的基(如二進(jìn)制的基是2,八進(jìn)制的基是8等), 函數(shù)輸出結(jié)果是字符串39。Private Function TrDec(idec As Integer, ibase As Integer) As String39。********** Program ********* Dim strDecR$, iDecR% strDecR = Do While idec 0 iDecR = idec Mod ibase If iDecR = 10 Then strDecR = Chr$(65 + iDecR 10) amp。 strDecR Else strDecR = iDecR amp。 strDecR End If idec = idec \ ibase Loop TrDec = strDecR39。********** End *************End FunctionPrivate Sub Form_Load() Show Print TrDec(45, 2) Print TrDec(45, 8) 39。 分別輸出 Print TrDec(45, 16)End Sub39。題目:(事件)單擊窗體。39。 (響應(yīng))輸出一個(gè)如圖所示的由數(shù)字組成的倒三角形39。 請(qǐng)將結(jié)果存入變量S中 (要求利用msgbox函數(shù)顯示結(jié)果,使用for...next語(yǔ)句完成程序)39。Private Sub Form_Click() Dim s As String39。***************** Program **************Dim tmp As StringDim i As Integer, j As Integertmp = For i = 10 To 1 Step 1 For j = 0 To i 1 tmp = tmp amp。 CStr(j) Next tmp = tmp amp。 vbCrLfNextMsgBox tmps = tmp39。*************** End *************************End Sub
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1