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

正文內容

vb程序改錯40題含答案(參考版)

2025-06-12 21:26本頁面
  

【正文】 39。 Spc(10)。 Space(10)。 k = k + 1 If k Mod 5 = 0 Then Print 。Option ExplicitPrivate Sub Form_Click() Dim k As Integer, i As Integer, j As Integer k = 0 For i = 100 To 200 For j = 1 To i 1 If i Mod j = 0 Then Exit For Next j If j = i Then Print i。 式輸出。題目:該程序的功能是求出100到200之間的全部素數(shù),39。【程序改錯】39。Option ExplicitPrivate Function jc(ByVal n As Integer) As Integer Dim I As Integer Dim result As Long result = 1 I = 1 Do While I = n If result 2114748348 / I Then result = result I = I + 1 Else = 溢出 jc = I Exit Function End If Loop jc = resultEnd FunctionPrivate Sub Form_Click() MsgBox jc(3)End Sub答案:=======(答案1)=======Private Function jc(ByVal n As Integer) As Long=======(答案2)=======result = result * I=========或=========result = I * result=======(答案3)=======jc = 1第72題 () 題號:14539。題目:下列程序進行n階乘運算,當階乘的值超過21147483648 溢出報錯,并將結果輸出為1。【程序改錯】39。Option ExplicitPrivate Sub Form_Click()ClsDim i As Integeri = InputBox(請輸入學習成績)Select Case i Case 0 i 100 MsgBox 成績應該在0100之間 Case 90 Print 優(yōu)秀 Case 75 To 89 Print 良好 Case 60 To 74 Print 及格 Case MsgBox 不及格, vbCriticalEnd SelectEnd Sub答案:=======(答案1)=======Case is100 ,is0 =========或========= case is0 ,is100=======(答案2)=======Case 90 to 100=======(答案3)=======Case else第71題 () 題號:47339。 (90分以上), 良好(75分以上),及格(60分以上)39。39。39。題目:從計算機輸入三個數(shù) , 找出中間數(shù)39?!境绦蚋腻e】39。 m第66題 () 題號:46739。Option ExplicitPrivate Sub Form_Click() Dim m As Integer, n As Integer, r As Integer m = InputBox(輸入m的值:) n = InputBox(輸入n的值:) Do While n 0 r = m / n m = n n = m Loop Print 兩數(shù)的最大公因子為:。題目:輸入兩個正整數(shù)m和n,求其最大公約數(shù)?!境绦蚋腻e】39。Option ExplicitFunction gcd(ByVal m As Integer, ByVal n As Integer) As Integer Dim r As Integer r = m Mod n Do While r 0 n = m n = r r = m Mod n Loop gcd = rEnd FunctionPrivate Sub Form_Click() Dim a As Integer, b As Integer, c As Integer a = InputBox(輸入一個整數(shù)) b = InputBox(輸入一個整數(shù)) a = Val(a) b = Val(b) Call gcd(a, b) Print a, b, cEnd Sub答案:=======(答案1)=======m = n=======(答案2)=======gcd = n=======(答案3)=======c = gcd(a, b)第65題 () 題號:49239。題目:用輾轉相除法求兩個整數(shù)的最大公約數(shù)。【程序改錯】39。 Next j Print Next i PrintEnd SubPrivate Sub Form_Click() Dim x(10, 10) As Integer Call readin(x(), 6) Call printf(x(), 6)End Sub答案:=======(答案1)=======a(i, i) = 1=======(答案2)=======For j = 2 To i 1=========或=========For j = 2 To 1 + i=======(答案3)=======For j = 1 To i第60題 () 題號:14639。Option ExplicitPublic Sub readin(a() As Integer, n As Integer) Dim i, j As Integer For i = 1 To n a(i, n) = 1 a(i, 1) = 1 Next i For i = 3 To n For j = 2 To n a(i, j) = a(i 1, j) + a(i 1, j 1) Next j Next iEnd SubPublic Sub printf(a() As Integer, n As Integer) Dim i, j As Integer For i = 1 To n For j = 1 To n Print Tab(5 * j + 10)。 1 4 6 4 139。 1 2 139。 139。題目:下面的程序用來產生并輸出圖示的楊輝三角?!境绦蚋腻e】39。Option ExplicitPrivate Sub Command1_Click() Dim pristr As String, outstr As String Dim i As Integer pristr = InputBox(please input a string) For i = 0 To Len(pristr) outstr = outstr + Mid(pristr, Len(pristr) i) Next i MsgBox outstr, , The Output Result End Sub答案:=======(答案1)=======For i = 0 To Len(pristr) 1=========或=========For i = 0 To 1+Len(pristr)=======(答案2)=======outstr = outstr + Mid(pristr, Len(pristr) i, 1)=========或=========outstr = Mid(pristr, Len(pristr) i, 1)+outstr=======(答案3)=======MsgBox outstr, vbQuestion, The Output Result 第59題 () 題號:14739。 gfedcba,輸出效果如圖1。 符串。題目:用InputBox函數(shù)輸入一個字符串,編寫程序按與39?!境绦蚋腻e】39。=======(答案3)=======Next x=========或=========Next第57題 () 題號:46539。Option ExplicitPrivate Sub Form_Click()ClsDim x As IntegerDim i As Integeri = 1For x = 1 To 40If (x / 3) = (x \ 3) Then Print x i = i + 1 End If If i Mod 5 = 0 Then PrintEnd Ifstep iEnd Sub答案:=======(答案1)=======i = 0=======(答案2)=======Print x 。 5個數(shù)一行。39。39。 otherEnd Sub答案:=======(答案1)=======Open amp。 spac。 數(shù)字個數(shù)為:。 \ For Output As 1 Do Until EOF(0) Line Input 1, s L = Len(s) For I = 1 To L C = Mid(s, I, 1) If C = a And C = z Or C = A And C = Z Then character = character + 1 ElseIf C = Then spac = spac + 1 ElseIf C = 0 And C 9 Then digit = digit + 1 Else other = other + 1 End If Next I Loop Close 1 Print 字符個數(shù)為:。39。39。39。39。 (2)在200元以上者,按九折優(yōu)惠;(3)300元以上39。 加速促成商品流通,采用購物打折的優(yōu)惠辦法,每39。題目:請根據下列描述編寫購物優(yōu)惠程序?!境绦蚋腻e】39。=======(
點擊復制文檔內容
教學教案相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1