=0){printf("Inputlogdate(format:2006-01-01):");scanf("%s",newlo" /> =0){printf("Inputlogdate(format:2006-01-01):");scanf("%s",newlo" />

全文预览

二工大程序的设计与实践(2)个人资金账户管理

上传者:科技星球 |  格式:doc  |  页数:14 |  大小:22KB

文档介绍
1s%-15s%10.2lf%10.2lf\n",log[i].logid,log[i].logdate,log[i].lognote,log[i].charge,log[i].balance);index=i;break;}}rewind(cfptr);if(index>=0){printf("Inputlogdate(format:2006-01-01):");scanf("%s",newlog.logdate);printf("Inputlognote:");scanf("%s",newlog.lognote);printf("InputCharge:e+andexpend-:");scanf("%lf",&newlog.charge);if(strcmp(log[index].lognote,newlog.lognote)!=0)strcpy(log[index].lognote,newlog.lognote);if(strcmp(log[index].logdate,newlog.logdate)!=0)?strcpy(log[index].logdate,newlog.logdate);if(newlog.charge!=log[index].charge)?{newlog.balance=log[index].balance-log[index].charge+newlog.charge;log[index].charge=newlog.charge;log[index].balance=newlog.balance;for(i=index+1;i<logcount;i++)log[i].balance=log[i-1].balance+log[i].charge;}rewind(cfptr);fwrite(plog,size,logcount,cfptr);

收藏

分享

举报
下载此文档