Dim n As Integer, s As Integer, i As Integer n=Val(Text1.Text) s=0 For i=1 To n Step 2 s=s+i Next i Text2.Text=Str(s) |
图1
Dim n As Integer, s As Integer, i As Integer n=Val(Text1.Text) s=0 i=1 Do While i<=n s=s+i i=i+2 Loop Text2.Text=Str(s) |
图2
当n的值为10时,关于该两段程序,下列说法不正确的是( )