计算机学习心得

来源:互联网 发布:怎样查看淘宝店铺等级 编辑:程序博客网 时间:2024/04/29 19:41
现在的学习深度在慢慢地变深,我们也学习更麻烦点的程序了。还是程序的输入有点头疼啊!

Private Sub Command1_Click()

Dim s As Integer

Dim n As Integer

Dim m As Integer

Dim x As Integer

Dim flag As Boolean

s = 0: n = 2

Do While n <= 100

s = s + n

n = x

m = Int(Val(Text1.Text))

x = m - 1

flag = False

 

While n >= 2

   If m Mod x = 0 Then

   flag = True

   End If

   x = x - 1

   Wend

   If flog = True Then

End If

Loop

Print "2+3+...+97="; s

 

End Sub

原创粉丝点击