没有合适的资源?快使用搜索试试~ 我知道了~
C语言仓库管理系统设计报告.docx
2 下载量 21 浏览量
2022-12-17
19:22:31
上传
评论
收藏 73KB DOCX 举报
温馨提示
试读
29页
C语言仓库管理系统设计报告.docx
资源推荐
资源详情
资源评论
�����������������������
�����0901��������
���20091221***�����2010-9-9
�����������������������
void find_l() ;//4. 1void find_2();//4. 2
void find_3();//4. 3void f ind_4();//4. 4
void f ind 5() ; //5. 1void f ind_6 () ; //5. 2
void find_7() ;//5.3void find_8() ;//5.4
void load�()�//� stu_list_l ����void main ()
(
int i, j ;
pr intf (
z�
what do you want to do?\nplease input the number according to the
explaination. \n
z�
);
for(i=l;i<12;i++)printf(
/z
if you input %d; then i t will work out the %d. \n
/z
, i, i);
printf (
/z
If you are first use it, please input 1, 2 or 3. \nNow please input the number:\n�
)�
scanf&j);
swi tch (j)
(
case l:scan_l();save_l();break;//I
case 2:scan2();save_2();change_l();break;//2
case 3:scan_3();save_3();change_2();break;//3
case 4:find_l();break;//4. 1
case 5:f ind_2();break;//4. 2
case 6:find_3();break;//4. 3
case 7:f ind_4();break;//4. 4
case 8:f ind 5 0;break;//5. 1
case 9:find_6();break;//5. 2
case 10:find_7();break;//5. 3
case 11:find_8();break;//5. 4
defaul t: printf (
��
error\n
/�
);
)}
void scan�()�����{
int i ;
printf ("'please input the information : \n
/z
);
for(i=0;i<SIZE;i++)
(
scanf (
z�
%s%s%s%d%fstu_l [i]. name, stu_l [i]. brand, stu_l [i]. style, & stu_l[i]. num,
&stu_l[i].money);
))
void scan_2()�������(
int i ;
printf (�����������\n�)�
for(i=0;i<SIZE;i++)
scanf (
��
%s%s%s%d%f%d%d%d%s
//
, stu 2 [ i ]. name, stu 2 [ i ]. brand, stu 2 [ i ]
.style, &stu_2 [ i ]. num, &,stu_2 [ i ]. money, &stu_2 [ i ]. time, year, &stu_2 [ i ]. time,
month, &stu_2 [i]. time, day, stu_2 [i]. stuf);)
void scan_3��������
int i ;
pr intf (���������\n�)�
for(i=0;i<SIZE;i++)
(
scanf (
��
%s%s%s%d%d%d%d%s
��
,
stu_3 [ i ]. name, stu_3 [ i ]. brand, stu_3 [ i ]. s
tyle, &stu_3 [ i ]. num, &stu_3 [ i ]. time, year, &stu_3 [i]. time, month, &stu_3 [ i]. time,
day, stu_3[i].stuf);
)
for(i=0;i<SIZE;i++)
(
if(strcmp(stu_l[i]. name, stu_3[i]. name)==0&&strcmp(stu_l[i].brand ,stu_3[i].
brand)==0&&strcmp(stu_l[i]. style,stu_3[i].style)==0)
if(stu_3[i]. num>stu_l[i].num) (printf (
z�
the error number, please input again\n
�)�
scanf (
��
%s%s%s%d%d%d%d%s
��
,
stu_3 [ i ]. name, stu_3 [ i ]. brand, stu_3 [ i ]. s
tyle, &stu_3 [i]. num, &stu_3 [i]. time, year, &stu_3 [i ]. time, month, &stu_3 [ i]. time,
day, stu_3[i].stuf);)
})
void save��//����������{
FILE *fp;
int i;
if((fp=fopen(�stu_ltxt",�wb�))��NULL)printf ("connot open the file\n�)�
return;
)
for(i=0;i<SIZE;i++)
(if(fwrite(&stu_l[i],sizeof (struct goods), 1,fp)! = 1) pr intf (^f i le write error\n
�z
);
)
fclose(fp);)
void save_2�//����������(
FILE *fp;
int i ;
if((fp=fopen(�stu_list_2.txt”,�wb�))��NULL)
(pr intf ("connot open the f i 1 e\n
z�
);
return;
}
for(i=0;i<SIZE;i++)
(if(fwrite(&stu2[i], s i zeof(struc t entrance), 1, fp) !=1) printf("file write error'n");
)
fclose (fp);)
void change��//��������������������
int i ;
load_l ();
for(i=0;i<SIZE;i++)
(
if(strcmp(stu_l[i]. name, stu_2[i].name)==0&&strcmp(stu_l[i].brand ,stu_2[i].
brand)==0&&strcmp(stu_l[i]. style,stu_2[iL style)==0)(
stu_l[i].num=stu_l[i].num+stu_2[i].num;}
}
save_l ();}
void save_3()�����������{
剩余28页未读,继续阅读
资源评论
黑色的迷迭香
- 粉丝: 703
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功