x=0
s =2
i=0
j =2
Do While j <= 10
s=s^i
x=x+s
j=j*2
i=i+1
Loop
Print x; s; i; j
Din i As Integer, j As Integer
For i=1 To 5
For j=1 To 5-i
Print ""; '输出一个空格
Next j
For j=1 To i
Print **;
Next j
Next i
甲 | 乙 | 丙 | 丁 |
For i=7 to 0 Print i Next i | For i=1 to 8 Print 8-i Next i | i=7 Do while i>0 Print i i=i-1 Loop Print i | i=8 Do while i>0 i=i-l Print i Loop |
遇见了Felt 生命值加2分
遇见了Reinhard 生命值加10分
遇见了Bully 生命值减30分
遇见了Emilia生命值加20分
假设Subaru初始生命值为5分,遇见的对象由你输入确定,当生命值超过50分时,或生命值为0或更低时则显示生命值后结束游戏,按如上需求,程序代码如下:
Score = 5
Flag = 0
Do While
X = InputBox("输入遇见对象")
If X = "Felt" Then
Score = Score + 2
ElseIf X = "Reinhard" Then
Score = Score + 10
ElseIf X = "Bul1y" Then
Score = Score - 30
ElseIf X = "Emi1ia" Then
Score = Score + 20
End If
If Then
Print Score
Flag=1
End If
Loop
假设定义变量X为字符串,其他均为整形,则代码中空缺的部分应分别填入( )。
Dim a As String, b As String
a = InputBox("a=") '键盘输入a的值
b = InputBox("b=") '键盘输入b的值
If a>b Then
a=a+b
Else
b=b+a
End If
Print a+b
\
Dim m As Integer, s As Integer, t As Integer
s=0
t=4
For m=t To 10 Step 2
s=s+m
Next m
Print s