上游充鱼大 SJTU School Of Software 2009-2-3 2 Data overflow Int count(int &a,int month_num) int month_income 0,i; for(i=0;i<month_num;i++) month_income+=a[i]; return month_income; } 11 000<a[i<10000 软件学院SJTU School Of Software 2009-2-3 软件学院 2 Data overflow Int count( int &a, int month_num) { int month_income = 0, i; for( i = 0; i< month_num; i++) month_income+=a[i]; return month_income; } //1000<a[i]<10000