求助高手~~!!!急~~用VB DO while 语句写“撕纸片”程序~~!!!!!

来源:百度知道 编辑:UC知道 时间:2024/06/06 00:00:16
撕纸片。每次将一张白纸沿垂直和水平中线对半撕成四张纸片,然后,取其中一张纸片照这样再撕成四张纸片,一直这样下去。计算撕了n次后纸片的张数,请完善以下程序:
Private Sub Command1_Click()
Dim i As Integer, n As Integer, s As Integer
N=InputBox(“请输入n的值:”)
________________
For i= 1 to ___________
S=______________
Next i
Label1.Caption=”纸片的张数是”+___________
End Sub

Private Sub Command1_Click()
Dim i As Integer, n As Integer, s As Integer
N=InputBox(“请输入n的值:”)
_s=1
For i= 1 to _n
s=_s+3
Next i
Label1.Caption=”纸片的张数是”+_cstr(s)
End Sub