算法与数据结构课程设计产品进销存管理系统内容摘要:

q=qnextproduct) { if(!(qnextproduct)) break。 } printf(需添加产品的名称、总量、进货日期、销出数量、销售时间 :\n)。 for(j=0。 jn。 j++) { p=(plinklist)malloc(sizeof(productlnode))。 scanf(%s %d %d,%d,%d %d %d,%d,%d,amp。 (ppname),amp。 (ptotalquantity),amp。 ((pgoodsdate).year),amp。 ((pgoodsdate).month),amp。 ((pgoodsdate).day), amp。 (psalesquantity),amp。 ((psalestime).year),amp。 ((psalestime).month),amp。 ((psalestime).day))。 pnextproduct=qnextproduct。 qnextproduct=p。 q=p。 } } return ok。 }//ProductInsert void ProQuantity_add(sqmountlink amp。 L,char pkindname1[],char pname1[],int n) { //添加顺序表挂接链表 L 的某产品类中的某产品的总量,且需添加的产品总量为 n int i, k。 plinklist p。 for(i=0。 i。 i++) { if(strcmp(([i]).pkindname,pkindname1)!=0) continue。 else break。 } if(i) { for (p=[i].firstproduct。 p!=NULL。 p=pnextproduct) { k=strcmp(ppname,pname1)。 if(k==0) { ptotalquantity=ptotalquantity+n。 7 printf( 查看添加后产品的各项输出 :%s %d %,d%d,%d %d %d,%d,%d\n,ppname,ptotalquantity,(pgoodsdate).year,(pgoodsdate).month,(pgoodsdate).day, psalesquantity,(psalestime).year,(psalestime).month,(psalestime).day)。 } } } }//ProQuantity_add void Visit(sqmountlink amp。 L,char pkindname3[],char pname3[]) { //在顺序表挂接链表 L 中,查询属于某产品类的某产品的各项信息 int i, k。 plinklist p。 for(i=0。 i。 i++) { if(strcmp(([i]).pkindname,pkindname3)!=0) continue。 else break。 } if(i) { for (p=[i].firstproduct。 p!=NULL。 p=pnextproduct) { k=strcmp(ppname,pname3)。 if(k==0) break。 } if(k!=0) printf(此产品不存在 :\n)。 else { printf(输出待查询产品的各项信息 :\n)。 printf(%s %s %d %d,%d,%d %d %d,%d,%d\n,([i]).pkindname,ppname,ptotalquantity,(pgoodsdate).year,(pgoodsdate).month,(pgoodsdate).day, psalesquantity,(psalestime).year,(psalestime).month,(psalestime).day)。 } } }// Visit void DisplayList(sqmountlink amp。 L) {//显示各产品所属产品类,产品名称、产品总量,进货日期,销出数量,销售时间 8 int i。 plinklist p。 printf(产品类 产品 产品总量 进货日期 销出数量 销售时间 \n)。 for(i=0。 i。 i++) { if(!([i].firstproduct)) printf(%s\n,([i]).pkindname)。 for(p=[i].firstproduct。 p。 p=pnextproduct) printf(%s %s %d %d,%d,%d %d %d,%d,%d\n,([i]).pkindname,ppname,ptotalquantity,(pgoodsdate).year,(pgoodsdate).month,(pgoodsdate).day, psalesquantity,(psalestime).year,(psalestime).month,(psalestime).day)。 } }//DisplayList void DestroyMountList(sqmountlink amp。 L) {//销毁已存在的顺序表挂接链表 L int i。 kindlnode *p。 plinklist q。 for(i=。 i=0。 i) { p=amp。 ([i])。 if((*p).firstpr。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。