题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-07-29 03:51:18

[填空题]阅读下面程序。
Private Function a(load As Integer) As Single
If load < 20 then
money = load / 2
else
money = 20 + load
end if
a = money
End Function
Private Sub Form_Click( )
Dim load As Integer, fee AS Single
Load = InputBox ("请输入一个数: ")
Fee = a(load)
Print fee
End Sub
输入20,运行后的输出结果是 【13】

更多"阅读下面程序。 Private Function a(load"的相关试题:

[填空题]阅读下面程序
Private Function a (load As Integer)As Single
If loud<20 then
money=lnad/2
else
money=20+load
end if
a=money
End Function
Private Sub Form_Click( )
Dim load As Integer,fee As Single
Load=InputBox("请输入一个数:")
Fee=a(load)
Print fee
End Sub
运行后的输出结果是 【12】
[填空题]阅读下面程序。 Private Function a(load As Integer) As Single If load < 20 then money = load / 2 else money = 20 + load end if a = money End Function Private Sub Form_Click( ) Dim load As Integer, fee AS Single Load = InputBox ("请输入一个数: ") Fee = a(load) Print fee End Sub 输入20,运行后的输出结果是 【13】
[填空题]阅读下面程序:
Private Function a(load As Integer) As Single
If load <20 then
money = load/2
else
money =20 + load
end if
a = money
End Function
Private Sub Form_Click( )
Dim load As Integer, fee As Single
Load = InputBox("请输入一个数:")
fee= a(loaD)
Print fee
End Sub
输入20,运行后的输出结果是 【6】
[单项选择]阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click( ) Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.
A. 16
B. 21
C. 26
D. 31
[填空题]如果存在如下过程:
Private Function FMaxla( ) As Integer)
Dim First As Integer,Last As Integer,i As Integer
First=LBound(a)
Last=UBound(a)
Max=a(First)
For i=First To Last
If a(i)>Max Then Max=a(i)
Next i
FMax=Max
End Function
在窗体上添加一个命令按钮,然后编写如下事件过程:
Private Sub Command_Click( )
ReDim m(1 To 4)As Integer
m(1)=20:m(2)=30:m(3)=50:m(4)=100
C=FMax(m)
Print C
End Sub
单击命令按钮,其输出结果为 (8)
[单项选择]有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick( ) Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。
A. 1
B. 3
C. 16
D. 9
[单项选择]

阅读下面程序:
INTEGER Q(3,4)
DATA Q/4*-1, 4*-2,4*-3/
S=0
DO10 K=1,3
10 S=S+Q(K,K+1)
DO 20 K=4,2,-1
20 S=S-Q(K-1,K)
WRITE(*,*)S
END
上述程序运行后.输出的S值为()。


A. 0.0
B. -1.0
C. -2.0
D. -6.0
[单项选择]阅读下列程序:
Function func(n As Integer)As Integer
Sum = 0
For i = 1 To n
Sum = Sum + (i + 1)* i
Next i
func = Sum
End Function.
Private Sub Command1_Click ( )
Dim a As Integer
a= 5
s = func (
A. 60
B. 70
C. 15
[填空题]如果存在如下过程:
Private Function FMax( a( ) As Integer)
Dim First As Integer, Last As Integer, i As Integer
First = LBound(a)
Last = UBound(a)
Max = a(First)
For i = First To Last
If a (i)>Max Then Max=a (i)
Next
FMax = Max
End Function
Private Sub Commandl Click( )
ReDim m (1 To 4) As Integer
re(1) =20: m(2) =30: m(3) =50: m(4) =100
c = FMax(m)
Print c
End Sub
单击命令按钮,其输出结果为 【13】
[填空题]如果存在如下过程:
Private Function Fun( a( ) As Integer)
Dim First As Integer, Last As Integer, i As Integer
First = LBound(a)
Last=UBound (a)
Max = a(First)
For i=First To Last
If a(i)>Max Then Max =a(i)
Next
Fun=Max
End Function
在窗体上添加一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
ReDim m(1 To 4) As Integer
m(1) =20: m(2) =30: m(3) =50: m(4) =100
c =Fun(m)
Print c
End Sub
单击命令按钮,其输出结果为 【10】

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码