Sub Ss(M As Integer)
Dim I As Integer
Print M & "=";
Do While M <> 0
For I = 2 To M
If M Mod I = 0 Then
Print I;
M = M \ I
Exit For
End If
Next
If M = 1 Then Exit Do
Print "*";
Loop
End SubPrivate Sub Command1_Click()dim M as integerM=val(inputbox("输入一个整数:"))
Ss (M)
End Sub
调用子过程Ss