質因數判斷與完全數

看板Visual_Basic作者 (小小小強)時間18年前 (2007/09/30 11:43), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
Private Sub Command1_Click() a = Text1.Text b = 0 '記錄幾個因數 List1.Clear '把列出來的數字清掉 For i = 1 To a If a Mod i = 0 Then List1.AddItem i b = b + 1 Text2.Text = b End If Next i End Sub 接下來該怎麼寫出裡面因數的質數出來呢? 完全數是什麼?該怎麼寫? 請求各位大大解惑  謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.165.137.130
文章代碼(AID): #16_njXGa (Visual_Basic)
文章代碼(AID): #16_njXGa (Visual_Basic)