您现在的位置: 首页 > 动态 > 文章正文动态
vb编程教程(如何用vb编写完全数的程序)
发布时间:2022-10-22 15:08 点击:次
Option Explicit Const N = 1000 Private Sub Command1_Click() Dim i As Long, j As Long, sum As Long For i = 2 To N sum = 0 For j = 1 To (i / 2) If i Mod j = 0 Then sum = sum + j DoEvents Next If sum = i Then Debug.Print i Next End Sub