создаешь на форме два текстовых поля с именами text1 и text2 и одну кнопку и пишешь в неё действие
Цитата:
Private Sub Command1_Click()
Text2.Text = ""
n = 0
For i = 1 To Val(Text1.Text) - 1
If Val(Text1.Text) Mod i = 0 Then n = n + i
Next i
If n = Text1.Text Then
Text2.Text = "Perfect! "
Else
Text2.Text = "Inperfect! :("
End If
End Sub
|