题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-03-15 03:55:39

[单选题]题 (1.0分)
写出如下程序运行结果().
Function f(m As Integer) As Integer
b = 1
Static c As Integer
b = b + 1
c = c + 1
f = m * b * c
End Function
Private Sub Command1_Click()
Dim a As Integer
a = 2
sum=0
For I = 1 To 3
sum=sum+ f(a)
Next I
print sum
End Sub
A.12
B.16
C.20
D.24

更多"[单选题]题 (1.0分)写出如下程序运行结果(). Functio"的相关试题:

[简答题]写出下面程序运行时的输出结果。
Int i = 1 , sum = 0 ;
While ( true )

Sumn + = i ;
I++;
If ( i > 1 0 ) break ;

Console . WriteLine ( sum ) ;
[单选题]题 (1.0分)
计算如下程序的运行结果().
Private Sub Form_Click()
A = 10
Print a
Call pro(a)
Print a
End Sub
Sub pro(ByVal a)
A = 20
End Sub
A.20
20
B.20
10
C.10
10
D.10
20
[单选题]如下程序运行后输出的结果是().
X=0
For k=3 To 5
X=x+2
S=s+x
Next k
Print s
A.3
B.12
C.6
D.9
[单选题]第249题 (1.0分)
如下程序运行后输出的结果是().
X=0
For k=3 To 5
X=x+2
S=s+x
Next k
Print s
A.3
B.12
C.6
D.9
[单选题]题 (1.0分)
如下程序.
运行的结果是().
Dim a%, b%, c%
Public Sub p1(x%, y%)
Dim c%
X = 2 * x. y = y + 2. c = c + y
End Sub
Public Sub p2(x%, ByVal y%)
Dim c%
X = 2 * x.. y = y + 2. c = x + y
End Sub
Private Sub Command1_Click()
A = 2. b = 4. c = 6
Call p1(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
Call p2(a, ((B)
Print "a=";
A, "b=";
B, "c="; c
End Sub
A.a=2 b=4 c=6
A=4 b=6 c=10
B.a=4 b=4 c=10
A=8 b=8 c=16
C.a=4 b=6 c=6
A=8 b=6 c=6
D.a=4 b=6 c=14
A=8 b=8 c=6
[单选题]题 (1.0分)
有如下程序,运行后单击按钮输出的结果是().
Private Sub Command1_Click()
M=5.n=4
Call A(m,n)
Print m,n
End Sub
Private Sub A(m,n)
S=m
M=s/n
N=s Mod n
End Sub
A.1.25 1
B.5 4
C.1 4
D.5 1
[单选题]有如下程序,运行后输出的结果是().
J=0:n=0
Do While n<3
j=(j+1)*(j+2)
n=n+1
Loop
Print j;n
A.0 1
B.182 3
C.30 4
D.3 3
[单选题]第267题 (1.0分)
有如下程序,运行后输出的结果是().
J=0.n=0
Do While n<3
j=(j+1)*(j+2)
n=n+1
Loop
Print j;n
A.0 1
B.182 3
C.30 4
D.3 3
[单选题] 下列程序运行的结果为:
Public class test {
Public static void main(String args[]) {
Int i;
Float f = 2.3f ;
Double d = 2.7;
I = ((int)Math.ceil(f)) * ((int)Math.round(d));
System.out.println(i);
}
}
A. 4
B. 5
C. 6
D. 6.1
E. 9
[单选题]有如下程序:
Const st$="CHINA"
St$="GREAT"
运行后输出的结果是().
A.CHINA
B.GREAT
C.Hebei
D.显示出错信息
[单选题]如下程序执行结果是( )
#include
Void main()
{ int x=23;
Do
{ printf("%d",x--);
}while(!x);
}
A. 321
B. 23
C. 不输出任何内容
D. 陷入死循环
[单选题]下列程序的运行结果是: public class test{   private String[] data={"10","10.5"};   public void fun(){     double s=0;     for(int i=0;i<3;i++){       try{         s=s+Integer .parseInt(data[i]);       }catch(Exception e{         System.out.print("errorl:"+data[i]);       }     }   }   public static void main(String[]args){     try{       test d=new test();       d .fun();     }catch(Exception e){       System.out.println("error2");     }   } }
A.errorl:10.5
B.error2
C.errorl:10.5 error2
D.以上都不对
[单选题] 下列程序运行的结果为:
Public class Example{
String str=new String("good");
Char[] ch={'a','b','c'};
Public static void main(String args[]){
Example ex=new Example();
Ex.change(ex.str,ex.ch);
System.out.print(ex.str+" and ");
Sytem.out.print(ex.ch);
}
Public void change(String str,char ch[]){
Str="test ok";
Ch[0]='g';
}
}
A. good and abc
B. good and gbc
C. test ok and abc
D. test ok and gbc
[单选题] 以下程序的运行结果为( )
Var str=’javascript’;
Console.log( str.slice(2,4) );
A.javascript
B.jascript
C.va
D.script

我来回答:

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

订单号:

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