[填空题] 执行下面程序,单击命令按钮cmd1后,窗体上显示的第一行内容是___(13)___,第二行内容是___(14)___ ;最后一行内容是___(15)___Option Explicit

[填空题] 执行下面程序,单击命令按钮cmd1后,窗体上显示的第一行内容是___(13)___,第二行内容是___(14)___ ;最后一行内容是___(15)___Option Explicit,第1张

[填空题] 执行下面程序,单击命令按钮cmd1后,窗体上显示的第一行内容是___(13)___,第二行内容是___(14)___ ;最后一行内容是___(15)___ Option Explicit

[填空题] 执行下面程序,单击命令按钮cmd1后,窗体上显示的第一行内容是___(13)___,第二行内容是___(14)___ ;最后一行内容是___(15)___ Option Explicit Private Sub Cmdl_Click()Dim i As Integer,c As Integer,s As String,t As String*1Dim a() As String,s1 As String,jg As Integers="43X17Z23Y"’For i=1 To Len(s) t=Mid(s,i,1) s1=s1 & t If t>="X" And t<="Z" Then c=c+1 ReDim Preserve a(c) a(c)=s1 s1="" End IfNext iCall sub1(a,jg)Print jg EndSub Private Sub sub1(a() As String,gj As Integer)Dim i As IntegerFor i=1 To UBound(a) gj=gj+tran(a(i))Next igj=gj/UBound(a) End Sub Private Function tran(ss As String)As IntegerDim i As Integer,t As Integer,st As String*1Dim P As IntegerP=Len(ss)-1st=Right(ss,1)If st="X" Then t=8ElseIf st="Y" Then t=10Else t=16End IfFor i=1 To P tran=tran+Val(Mid(ss,i,1))*t^(P-i)Next iPrint tran End Function

正确答案:

35 23 27

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5628403.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-15
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存