Function sushu(a As Integer) As Integer
For i = 2 To a
If a Mod i = 0 Then
sushu = 0
Exit Function
End If
Next i
sushu = 1
End Function
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
c = Val(Text1.Text)
If c > 6 Then
For a = 2 To c Step 1
If sushu(a) = 1 Then
b = c - a
If sushu(b) = 1 Then
List1.AddItem Str(c) & "=" & Str(a) & "+" & Str(b)
End If
End If
Next a
End If
End Sub
For i = 2 To a
If a Mod i = 0 Then
sushu = 0
Exit Function
End If
Next i
sushu = 1
End Function
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
c = Val(Text1.Text)
If c > 6 Then
For a = 2 To c Step 1
If sushu(a) = 1 Then
b = c - a
If sushu(b) = 1 Then
List1.AddItem Str(c) & "=" & Str(a) & "+" & Str(b)
End If
End If
Next a
End If
End Sub