F.unction Fun(S As String)As String
D.im s1 As String
F.or i=1 To Len(S)
s1=LCase(Mid(S, i, 1))+s1
Next i
F.un=s1
E.nd Function
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
D.im Str1 As String, Str2 As String
Str1=InputBox("请输入一个字符串")
Str2=Fun(Str1)
Print Srt2
E.nd Sub
程序运行后,单击命令按钮,如果在输入对话框中输入字符串“abcdefg”,则单击“确定”按钮后在窗体
上的输出结果为( )。
A.)ABCDEFG
B.)abcdefg
C.)GFEDCBA
D.)gfedcba
[单选题]假定有以下函数过程:F.unction Fun(S As String)As StringD.im sl As StringF.ori=1 ToLen(S)sl=Lease(Mid(S,i,1))+s1NextiF.un=s1E.nd Function在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl Click(、D.im Str1 As String.Str2 As StringStrl=InputBox(”请输入一个字符串”)Stf2=Fun(Strl)
[单选题]假定有以下函数过程: Function Fun(S As String)As String Dimsl As String Fori=1 To Len(S) s1=UCase(Mid(S,i,1))+s1 Nexti Fun=s1 End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() DimStrl As String,Str2 As StrA.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA
[单选题]假定有以下函数过程:Function Fun(S As String)As StringDim Sl AS StringFor i=1 TO Len(S)sl=UCase(Mid(S,i,1))+slNext iFun=s1End Function则Str2= Fun("abcdefg")的输出结果为( )。A. abcdefg B.ABCDEFGC.gfedcba D.GFEDCBA
[单选题]函数过程如下: FUNCTION FUN( N AS STRING)AS STRING DIM N1 AS STRING FOR I=1 TO LEN(N) N1 =UCASE(MID(N,I, 1)) + N1 NEXT I FUN: N1 END FUNCTION 则S=FUN("uvwxyz")的输出结果为( )。A.uvwxyzB.zyxwvuC.UVWXYZD.ZYXWVU
[单选题]假定有以下函数过程: Function Fun(S As String) As String Dim sl As String For i=1 To Len(S) s1=UCase (Mid(S,i,1))+s1 Next i Fun=s1 End Function则Str2=Fun("abcdefg”)的输出结果为( )。A.abcdefgB.ABCDEFGC.gfedcbaD.GFEDCBA
[单选题]( 25 )设有以下函数过程F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thenc=a:a=b:b=cE.nd Ifc=0D.oc=c+aLoop Until c Mod b=0fun=cE.nd function若调用函数 fun 时的实际参数都是自然数,则函数返回的是A. ) a 、 b 的最大公约数B. ) a 、 b 的最小公倍数C. ) a 除以 b 的余数D. ) a 除以 b 的商的整数部分
[单选题]设有以下函数过程:F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thenc=a:a=b:b=CE.nd IFc=0D.oc=c+aLoop Until c Mod b=0fun=cE.nd Function若调用函数fun时的实际参数都是自然数,则函数返回的是( )。A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分
[单选题]设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerE.hd Function若已有变量声明:D.im x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是A.x(0)=Fun(x,“ch”)B.n=Fun(n,ch)C.Call Fun x,“ch”D.n=Fun(x(5),ch)
[单选题]设有以下函数过程:F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thene=a:a=b:b=cE.nd Ifc=0D.oc=C+aroop Until c Mod b=0fun=cE.nd Function若调用函数fun时的实际参数都是自然数,则函数返回的是A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分
[单选题](23)设有以下函数过程Private Function Fun(a() As Integer, b As String) As Integer...E.nd Function若已有变量声明:D.im x(5)As Integer, n As Integer, ch As String则下面正确的过程调用语句是A.)x(o)=Fun(x, "ch")B.)n=Fun(n, chC.)Call Fun x, "ch"D.)n=Fun(x(5), ch)