Dim s As Long,n As SinglePrivate Sub Command1_Click()n = 0Do While s < 20n = n + 1s = 12 * (1 + 0.01) ^ nLoopPrint n; "年后我国人口将增长到20亿"EndEnd Sub

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/30 06:18:05
DimsAsLong,nAsSinglePrivateSubCommand1_Click()n=0DoWhilesDimsAsLong,nAsSinglePrivateSubCommand1_Clic

Dim s As Long,n As SinglePrivate Sub Command1_Click()n = 0Do While s < 20n = n + 1s = 12 * (1 + 0.01) ^ nLoopPrint n; "年后我国人口将增长到20亿"EndEnd Sub
Dim s As Long,n As Single
Private Sub Command1_Click()
n = 0
Do While s < 20
n = n + 1
s = 12 * (1 + 0.01) ^ n
Loop
Print n; "年后我国人口将增长到20亿"
End
End Sub

Dim s As Long,n As SinglePrivate Sub Command1_Click()n = 0Do While s < 20n = n + 1s = 12 * (1 + 0.01) ^ nLoopPrint n; "年后我国人口将增长到20亿"EndEnd Sub
这段程序挺好的
没什么逻辑毛病
你是不是问语法错误?

你什么意思?
这段程序挺好的
没什么逻辑毛病
你是不是问语法错误? sdasg