close




程式碼:
Private Sub Command1_Click()
Dim n As Long

n = InputBox("輸入一正整數值")

msg = n & "="

For i = 2 To n
Do While n Mod i = 0
n = n / i
msg = msg & i & "x"
Loop
Next i

MsgBox Left(msg, Len(msg) - 1)

End Sub

arrow
arrow
    全站熱搜

    愛爾 發表在 痞客邦 留言(0) 人氣()