作业帮 > 数学 > 作业

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
1、 有如下程序a$=
D A D B B
C C C A D