1、简单的商品库存管理程序 c 语言(Simple commodity inventory management procedures, C language)# includes stdio.h number, p2 - name);p2 - count = 0;while (p2 - number)if (n = = 0) head = p1.else p1 - next = p2.p1 = p2.p2 = (struct goods *) malloc (len);printf (“input number scanf (“% 7d% s p2 - count = 0;n + +;p1 -
2、next = null;return head;struct goods * destory (struct goods * head)char word;struct goods * p1 * p2;p1 = p2 = head;i givegetchar ();printf (“do you really want to destory the goods system y / n n?) ;scanf (“% c“, (单词)!= Y &字!= n) ;如果(字= = Y)如果(P1)做P2P1;下一步;免费(无效*)P2) ;(P1) ;printf(“货物系统被摧毁!“n) ;返回 null;else printf(“手术破坏已取消n” ) ;返回头;货物销售结构(长整数、整数、结构、货物、头)结构*;如果(头= NULL)printf(“错误!系统是空的!“n) ;系统(暂停) ;返回 null;对于(P1 =头;P1!= NULL;如果(P1 =数字=数字)中断;如果(P1)如果(P1 =计数号码,头-名称-,头数) ;头=下一个;(头) ;else printf(“系统空!“n) ;结构*货物结构;如果(P1 =头)头=下一个;否则如果返回头;其他的为(P2 =;如果(P2 =下一个)下一步;打破;免费(无效*)P1) ;返回头;