SLIP
18_1
Option
Explicit
Private
Sub Command1_Click()
Dim
num As Integer
Dim
i As Integer
Dim
sum As Integer
num
= Val(Text1.Text)
For
i = 1 Tonum \ 2
If
num Mod i = 0 Then
sum
= sum + i
End
If
Next
If
sum = num Then
MsgBox
"Numbe is perfect"
Else
MsgBox
"Number is not perfect"
End
If
No comments:
Post a Comment
Note: only a member of this blog may post a comment.