下列VB程序運行時,單擊命令按鈕Command1后,文本框Text1中顯示的內容是:22.
Private Sub Command1_Click( ?。?/div>( ?。?/div>
Dim x As Integer,m As Integer
For x=1To 5
m=3
If m>3Then m=m+2Else m=m-1
Next x
Text1.Text=Str(m)
End Sub.【考點】選擇語句;對象的屬性、方法和事件.【答案】2;( ?。?/div>【解答】【點評】聲明:本試題解析著作權屬菁優網所有,未經書面同意,不得復制發布。發布:2024/6/27 10:35:59組卷:8引用:2難度:0.3
相似題
-
1.編寫程序查找字符串中最長連續相同字符的長度:

橫線處可選代碼為:①h②h=0③h=h+1④Mid(s,i,l)=Mid(s,i+1,1)⑤Mid(s,i,1)=Mid(s,i-1,1),則①②③處語句依次為( ?。?/h2>
A.⑤①③ B.⑤③② C.④①③ D.⑤③①
發布:2025/1/2 10:30:2組卷:1難度:0.4
-
2.下列選項中,與語句“Ifx>188 Then y=x*0.5 Else y=x*0.8“功能相同的是( ?。?/h2>
A.Ifx>188 Then y=x*0.5 y=x*0.8 B.Ifx<188 Then y=x*0.8 Else y=x*0.5 C.y=x*0.8 Ifx>188 Then
y=x*0.5 D.Ifx>188 Then y=x*0.5 Ifx<188 Then y=x*0.8
發布:2025/1/2 10:30:2組卷:1引用:2難度:0.5
-
3.有程序代碼如下,輸入某數據后,輸出結果為“B”。那么輸入的數據可能是( ?。?br />Dim score As Integer
score=Val(InputBox(“score:“))
If score>89 Then
Print“A“
Else
If score>59 Then
Print“B“
Else
Print“C“
End If
End If
A.59 B.95 C.50 D.80
發布:2025/1/2 12:0:1組卷:0引用:1難度:0.6
( ?。?/div>
Dim x As Integer,m As Integer
For x=1To 5
m=3
If m>3Then m=m+2Else m=m-1
Next x
Text1.Text=Str(m)
End Sub.
Dim x As Integer,m As Integer
For x=1To 5
m=3
If m>3Then m=m+2Else m=m-1
Next x
Text1.Text=Str(m)
End Sub.
【考點】選擇語句;對象的屬性、方法和事件.
【答案】2;( ?。?/div>
【解答】
【點評】
聲明:本試題解析著作權屬菁優網所有,未經書面同意,不得復制發布。
發布:2024/6/27 10:35:59組卷:8引用:2難度:0.3
相似題
-
1.編寫程序查找字符串中最長連續相同字符的長度:
橫線處可選代碼為:①h②h=0③h=h+1④Mid(s,i,l)=Mid(s,i+1,1)⑤Mid(s,i,1)=Mid(s,i-1,1),則①②③處語句依次為( ?。?/h2>A.⑤①③ B.⑤③② C.④①③ D.⑤③① 發布:2025/1/2 10:30:2組卷:1難度:0.4 -
2.下列選項中,與語句“Ifx>188 Then y=x*0.5 Else y=x*0.8“功能相同的是( ?。?/h2>
A.Ifx>188 Then y=x*0.5 y=x*0.8 B.Ifx<188 Then y=x*0.8 Else y=x*0.5 C.y=x*0.8 Ifx>188 Then
y=x*0.5D.Ifx>188 Then y=x*0.5 Ifx<188 Then y=x*0.8 發布:2025/1/2 10:30:2組卷:1引用:2難度:0.5 -
3.有程序代碼如下,輸入某數據后,輸出結果為“B”。那么輸入的數據可能是( ?。?br />Dim score As Integer
score=Val(InputBox(“score:“))
If score>89 Then
Print“A“
Else
If score>59 Then
Print“B“
Else
Print“C“
End If
End IfA.59 B.95 C.50 D.80 發布:2025/1/2 12:0:1組卷:0引用:1難度:0.6
本網部分資源來源于會員上傳,除本網組織的資源外,版權歸原作者所有,如有侵犯版權,請立刻和本網聯系并提供證據,本網將在三個工作日內改正