急求制作一个C语言商品管理系统的参考函数,例如菜单、录入数据、存文件.........等等

来源:百度知道 编辑:UC知道 时间:2024/05/27 18:33:11
其中的数据包含有货号、货名、类别、单价、数量等信息,系统要求具有添加、修改、删除、计算(输入商品货号及数量,可以计算出价格,或计算同类商品价格的平均值等)等功能

郁闷,没有一分...\'\
#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:");
gets(te