1、 有如下程序a$="12345":b="abcde"for j=1 to 5c$=c$+left(a$,1)+rig
来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/10/01 08:27:12
1、 有如下程序
a$="12345":b="abcde"
for j=1 to 5
c$=c$+left(a$,1)+right(b$,1)
next j
print c$
end
运行时输出的结果为
A) alb2c3d4e5 B) la2b3c4dse
C) eld2c3d4as D) 1e1e1e1e1e
请选择-> A B C D
2、 下列程序段的执行结果为
x=0
print x-1
x=3
A) -1 B) 3
C) 2 D) 0
请选择-> A B C D
3、 能够实现以下分段函数的程序段是()
2x+1 (x≥0)
f(x)={
2x-1 (<0)
A) if x>=0 then y=2x+1 B) if x>=0 then y=2*x+1
y=2x-1 else
y=y=2*x-1
C) if x≥0 then D) if x>=0 then
y=2*x+1 y=2*x+1
else else
y=2*x-1 y=2*x-1
end if end if
请选择-> A B C D
4、 下列程序段的执行结果是()
a="1"
b="6"
a=val(a)+val(b)
b=val("16")
if ab then print a-b else print b-a
A) 9 B) -9 C) 7 16 D) 0
请选择-> A B C D
5、 下列程序段的执行结果是()
a=85
if a>70 then t=1
if a>80 then t=2
if a>90 then t=3
if a>100 then t=4
print "t=";t
A) t=1 B) t=2 C) t=3 D) t=4
请选择-> A B C D
6、 下列程序段的执行结果是().
x=6
for j=1 to 10 step -2
x=x+j
next j
print j;x
A) -1 6 B) -1 16 C) 1 6 D) 11 31
请选择-> A B C D
7、 判断下面程序段是计算哪一个数学式的().
n=inputbox("输入n的值")
t=1:s=0
For i = 0 To n
t=t*i
s=s+1/t
next i
print s
A) 1+2+3+…+N B) +2!+3!+…+N!
C) +1/2!+1/3!+…+1/N!D) 1+1/2+1/3+…+1/N
请选择-> A B C D
8、 程序的基本控制结构是
A) do-loop结构、do-loop while结构、for-next结构
B) 子程序结构,自定义函数结构
C) 顺序结构,选择结构,循环结构
D) 单行结构,多行结构和多分支结构
请选择-> A B C D
9、 变量未赋值时,数值型变量的值为
A) 0 B) 空串 C) null D) 没有任何值
请选择-> A B C D
10、 下列程序段的执行结果为
a=10
b=30
if a
a$="12345":b="abcde"
for j=1 to 5
c$=c$+left(a$,1)+right(b$,1)
next j
print c$
end
运行时输出的结果为
A) alb2c3d4e5 B) la2b3c4dse
C) eld2c3d4as D) 1e1e1e1e1e
请选择-> A B C D
2、 下列程序段的执行结果为
x=0
print x-1
x=3
A) -1 B) 3
C) 2 D) 0
请选择-> A B C D
3、 能够实现以下分段函数的程序段是()
2x+1 (x≥0)
f(x)={
2x-1 (<0)
A) if x>=0 then y=2x+1 B) if x>=0 then y=2*x+1
y=2x-1 else
y=y=2*x-1
C) if x≥0 then D) if x>=0 then
y=2*x+1 y=2*x+1
else else
y=2*x-1 y=2*x-1
end if end if
请选择-> A B C D
4、 下列程序段的执行结果是()
a="1"
b="6"
a=val(a)+val(b)
b=val("16")
if ab then print a-b else print b-a
A) 9 B) -9 C) 7 16 D) 0
请选择-> A B C D
5、 下列程序段的执行结果是()
a=85
if a>70 then t=1
if a>80 then t=2
if a>90 then t=3
if a>100 then t=4
print "t=";t
A) t=1 B) t=2 C) t=3 D) t=4
请选择-> A B C D
6、 下列程序段的执行结果是().
x=6
for j=1 to 10 step -2
x=x+j
next j
print j;x
A) -1 6 B) -1 16 C) 1 6 D) 11 31
请选择-> A B C D
7、 判断下面程序段是计算哪一个数学式的().
n=inputbox("输入n的值")
t=1:s=0
For i = 0 To n
t=t*i
s=s+1/t
next i
print s
A) 1+2+3+…+N B) +2!+3!+…+N!
C) +1/2!+1/3!+…+1/N!D) 1+1/2+1/3+…+1/N
请选择-> A B C D
8、 程序的基本控制结构是
A) do-loop结构、do-loop while结构、for-next结构
B) 子程序结构,自定义函数结构
C) 顺序结构,选择结构,循环结构
D) 单行结构,多行结构和多分支结构
请选择-> A B C D
9、 变量未赋值时,数值型变量的值为
A) 0 B) 空串 C) null D) 没有任何值
请选择-> A B C D
10、 下列程序段的执行结果为
a=10
b=30
if a
D A D B B
C C C A D
C C C A D
6、 有如下程序 for m=1 to 4 a=0 for j=1 to 5 a=1 for k=1 to 6 a=a+
有如下程序dim arr(3,3) for j=1 to 3 for j=1 to 3 arr(j,k)=(j-1)*3
1有如下程序段:int a=14,b=15,x; char c='A'; x=(a&&b)&&(c
有如下代码: For i = 1 To 3 For j = 1 To i For k = j To 3 a = a +
vb中有如下一段程序 a=sqr(3) b=sqr(2) c=a>b msgbox c+2 请问c=a>b是什么意思,
这个C题目真的不懂,若有如下程序段,其中s、a、b、c均已定义为整型变量,且a、c均已赋值(c大于0):s=a;for(
有以下程序,#include Main(){char A,B,C;B=’1’;C=’A’For(A=0;A
有如下程序段:a=3 b=5 z=a a=b b=z 该程序段运行后,变量a的值为( ) A.3 B.5 C.8 D.0
char c='A'; for(int j=7;j>=0;--j) coutj&1);
读下面程序:for i=1 to 3 for j=i to1 for k=j to 3 a=a+1 next k nex
有如下程序,int a[10]={1,2,3,4,5,6,7,8,9,10}; int *p=&a[3],b;b=p[5
有如下程序cint a[10]={1,2,3,4,5,6,7,8,9,10};int *p = &a[3],b;b=p[