求高手写出源代码,急急急急急急!!!!!!!!!!!!

解决方案 »

  1.   

    Private Sub Command1_Click()
        Dim i As Long
        Dim j As Long
        Dim s As Long
        Dim text As String
        
        For i = 1 To 1000
            s = 0
            text = "="
            For j = 1 To i - 1
                s = s + j
                text = text & CStr(j) & "+"
                If (s = i) Then
                    text = Left(text, Len(text) - 1)
                    Debug.Print (s & text)
                    Exit For
                End If
            Next
        Next
    End Sub
      

  2.   

    #include<stdio.h>
    void main()
    {
    int i,s,a;
    s=0;
    for(a=1;a<=1000;a++)
     {s=0;
      for(i=1;i<=a;i++)
       if(a%i==0)
       s+=i;
       if(s==2*a)
       printf("输出完全数%d\n",a);
      
     }}
    这是我现写的  你看看吧