试题 试卷
题型:综合题 题类:常考题 难易度:普通
【bj】高中信息技术综合库——解析算法及程序实现2
Private Sub Form_Click()
Dim y, s, n As Integer
n = InputBox("输入n")
y = 0:
Do While n \ 10 <> 0
y = n Mod 10
s = s + y
n = n \ 10
Loop
Print s
End Sub
①处应填写:;②处应填写:。
Dim As Integer, j As Integer, x As Integer
For i=1 To 100
x=0
For j=1 To i-1
If i Mod j=0 Then x=1
Next j
If x=0 Then Print x
Next i
a = [0 for i in range(n+1)] for j in range(n+1)]
a[0][0]=1
for i in range(1,n+1):
a[i][0]=1
for j in range(1,i+1)
a[i][i] = a[i-1][j-1]+a[i-1][j]
p = "Call-168"
c = " "
for ch in p:
if ch >= "0" and ch <= "9":
c += str(9-int(ch))
elif ch >= "a" and ch <= "z":
c += chr(ord(ch) - ord("a")+ord("A"))
else:
c += ch
print(c)
程序运行后,输出的结果是( )
试题篮