这问题出在什么地方 2000以内的完数

// 2000以内所有的完数.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "iostream" using namespace std; void IfWan(int a,int* end) { int j,sum=0,count=0; for(j=1;j<a;j++) { if(a%j==0) { sum+=j; } } if(sum==a) { end[count]=a; count++; } } int _tmain(int argc, _TCHAR* argv[]) { int jg[100]={0}; for(int i=1;i<2000;i++) { IfWan(i,jg); } for(int j=0;j<100;j++) { cout<<jg[j]<<endl; } system("pause"); return 0; }怎么输出的结果为496啊??
