if(num[i][1]) num[i-1][0]=num[i][0]; else break; } num[i-1][0]=0; num[i-1][1]=0; }}} // 将数组形式数字转换为十进制数 void arry_decimal() { short i,j; long y,locate=1; if(point==1)// 如果是小数找到小数点位置{ for(i=1;i<8;i++) if(num[i][0]>=10 && num[i][0]<20) { num[i][0]=num[i][0]-10; for(j=0;j<i;j++) locate=locate*10; break; }} for(i=0,suff2=0;i<8;i++) { if(num[i][0]<10) { for(j=0,y=1;j<i;j++) y=y*10; suff2=suff2+num[i][0]*y; } else suff2=-suff2; } if(point==1) { suff2=suff2/locate; point=0; }} // 运算 double result(double suff1,int notation) { arry_decimal(); if(notation==0) suff1=suff2; else { switch(notation) { case 1:suff1 = suff1 + suff2;break; case 2:suff1 = suff1 - suff2;break; case 3:suff1 = suff1 * suff2;break; case 4: if(suff2==0) suff1=100000000; else suff1=suff1/suff2; break; default:break; }} init_num();