#include #include #include #include struct Info { char num[20]; char name[20]; int price; int amount; }; char menu() /*菜单选择函数*/ { char n; /*n 记录选择的菜单*/ system("cls"); puts("\t\t 欢迎来到仓库货物管理系统 "); puts("\t\t***********************MENU***********************\n"); puts("\t\t* 1
录入货物信息 *\n"); puts("\t\t* 2
显示货物信息 *\n"); puts("\t\t* 3
查找货物信息 *\n"); puts("\t\t* 4
修改货物信息 *\n"); puts("\t\t* 5
删除货物信息 *\n"); puts("\t\t* 6
退出系统 *\n"); puts("\t\t**************************************************\n"); puts("*********************************"); printf("* 请选择你要输入数(1-6): *\n"); puts("*********************************"); while(1) { n=getchar(); getchar(); if(n'6') { puts("**********************************"); printf("* 出错了
请再次输入(1-6): *\n"); puts("**********************************"); } else break