下列程序用来计算1+2+…n,当和大于100时停止计算,请填空。 Private Sub Form_Click() Dim n as integer,S as integer,I as integer,k as integer s=0

admin2012-03-22  29

问题 下列程序用来计算1+2+…n,当和大于100时停止计算,请填空。
   Private Sub Form_Click()
   Dim n as integer,S as integer,I as integer,k as integer
   s=0
   k=0
   n=inputbox(”请输入n的值)
   For i=1 to 100
    k=k+1
    s=s+1
   ______
   Next 1
   Print s
   End Sub

选项

答案if s>100 then exit for

解析
转载请注明原文地址:https://jikaoti.com/ti/iJO0FFFM
0

最新回复(0)