全文预览

《 程序设计基础 》

上传者:苏堤漫步 |  格式:doc  |  页数:13 |  大小:253KB

文档介绍
f the goods you want to delete:");Р?fflush(stdin);Р?scanf("%s",number);Р?int i;Р?for (i=0;i<storehouse.count;i++)Р?{Р if(strcmp(number,storehouse.goods[i].number)==0)break;Р?}Р?if (i!=storehouse.count)Р?{Р for(;i<storehouse.count-1;i++)Р {Р strcpy(storehouse.goods[i].name,storehouse.goods[i+1].name); //将i+1的地址给予iР strcpy(storehouse.goods[i].number,storehouse.goods[i+1].number);Р strcpy(storehouse.goods[i].publish,storehouse.goods[i+1].publish);Р strcpy(storehouse.goods[i].author,storehouse.goods[i+1].author);Р strcpy(storehouse.goods[i].time,storehouse.goods[i+1].time);Р storehouse.goods[i].price=storehouse.goods[i+1].price;Р }Р storehouse.count--;Р?}Р?elseР printf("\n cannot found!\n");Р?save();Р?fflush(stdin);Р?getchar();Р}Рvoid update()//修改图书信息Р{Р?char number[10];Р?system("cls"); /*清屏*/

收藏

分享

举报
下载此文档