为什么当第二次满足if条件时,里面的语句不输出。。。
程序代码:
[local]2[/local] while(sum>0){ printf("%d %d\n",sum,temp); if(sum>temp){ for(i=0;tim*10/10!=0;i++){ c[i]=tim%10; tim/=10; } j=i-1; for(i=0;i<=j;i++) {fputc(c[j-i]+48,fp2);printf("%d ",c[j-i]);} fputc(' ',fp2); fputc('1',fp2);} else{ int fim=sum; for(i=0;fim*10/10!=0;i++){ d[i]=fim%10; fim=fim/10; } j=i-1; for(i=0;i<=j;i++) {fputc(d[j-i]+48,fp2);printf("%d ",d[j-i]);} fputc(' ',fp2); fputc('0',fp2);} fputc(' ',fp2);fputc('0',fp2);fputc(' ',fp2); int aim=(dim-sum)/8; if(aim!=0){ for(i=0;aim*10/10!=0;i++){ e[i]=aim%10; aim=aim/10; } j=i-1; for(i=0;i<=j;i++) fputc(e[j-i]+48,fp2);} else fputc('0',fp2); sum-=temp-20; fputc('\n',fp2); } input.txt里面内容:3820 1420
IP - 副本.rar
(970 Bytes)