C语言做个小型商品销售管理系统

来源:百度知道 编辑:UC知道 时间:2024/06/08 17:48:00
5.9题目九:小型商品信息管理系统
设计一个商品信息管理系统,模拟超市商品管理。
对商品信息进行分类:日用品,食品,电器
各类商品包括的信息有: 编号,商品名称,商品类别,产地,供货商,单价,库存数量,采购日期。
系统实现下述功能:
(1)能录入商品信息
(2)能对商品信息进行查询
可以按编号,按商品名称,按商品类别,按供货商,按产地进行查询
(3)可以对商品信息进行修改,删除
(4)可以对新商品进行入库登记
要求:界面友好,易于操作,采用二进制文件存储数据。

5.10题目十:小型商品销售管理系统
此题可与9题合做。
设计一个商品销售系统,模拟超市商品销售流程。
销售单包含的信息如下:流水号,商品编号,销售数量,销售单价,销售日期,销售人员
系统实现下述功能:
(1) 商品销售:
要求:输入销售单,根据商品编号,读取并显示磁盘文件中的商品信息,根据销售数量,修改库存,
(2) 商品销售信息查询:
a) 根据商品编号查询
b) 根据销售日期查询
c) 根据销售人员查询
(3)统计
a) 日销售额 b) 月销售额 c) 季销售额 d) 月度销售排名 e)。。。
(4)库存信息提醒

我这里有一个!
具体的,稍微改一下就可以了!

#include "stdio.h" /*I/O函数*/
#include "stdlib.h" /*其它说明*/
#include "string.h" /*字符串函数*/
#include "conio.h" /*屏幕操作函数*/
#include "mem.h" /*内存操作函数*/
#include "ctype.h" /*字符操作函数*/
#include "alloc.h" /*动态地址分配函数*/
struct score
{
int mingci;
char xuehao[8];
char mingzi[20];
float score[6];
}data,info[1000];
int i,j,k=0;
char temp[20],ch;
FILE *fp,*fp1;

void shuru()
{
if((fp=fopen("s_score.txt","ab+"))==NULL)
{
printf("cannot open this file.\n");
getch();exit(0);
}
for(i=0;i<=1000;i++)
{
printf("\nPlease shuru xuehao:");
gets(data.xuehao);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");