You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
teamworks/code/system.c

46 lines
971 B

2 years ago
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "void.c"
int main ()
{
LIST *pList = NULL;
pList = creation ( );
readData2 ( pList );
while ( 1 )
{
int choice = menu ( );
int c1;
getchar();
switch ( choice )
{
case 1:
c1= menu1();
if(c1==1) readData1 ( pList );
if(c1==2) saveData(pList);
if(c1==3) show_goods(pList);
if(c1==4) find_goods(pList);
if(c1==5) insert(pList);
if(c1==6) increase_count(pList);
if(c1==7) delete_from_list(pList);
if(c1==8) sort(pList);
if(c1==9) Show(pList);
if(c1==0) {saveData(pList); printf("感谢使用");}
break;
case 2:
saveData ( pList );
printf("感谢使用");
return 0;
break;
default:
printf ("输入的信息有误,请重新输入!!!\r\n");
break;
}
}
return 0;
}