ImageVerifierCode 换一换
格式:DOCX , 页数:21 ,大小:31.18KB ,
资源ID:3314457      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/3314457.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(通信工程专业C语言课程设计.docx)为本站会员(b****6)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

通信工程专业C语言课程设计.docx

1、通信工程专业C语言课程设计通信工程专业C语言课程设计报 告专 业: 通信工程 班 级: 0802 姓 名: 彭孟秋 指导教师: 丁雄 00九年十二月二十五日1课程设计题目及基本内容 22课程设计思路及设计流程图 33程序调试分析 54总结 5参考书目 6附程序代码 6课程设计题目 :商品信息管理系统基本内容:设计商品信息管理系统,商品包括:商品编号,名称,出产年月,价格等。系统 功能包括:1、系统以菜单方式工作,密码登陆。2、商品信息的录入功能 (增加数据)。用数组数据类型赋初值的方法把商品信息 送到各个数组中(但注意要是合法数据) ,然后把它们输出显示。3、商品信息的删除(删除数据) 。任意

2、输入一个商品的编号,将它所有的信息从 组数中删除。4、商品信息的浏览功能(查找数据) 。任意输入一个商品的编号,打印出他的所 有数据。要求能多次查找。5、商品信息的删除(修改数据) 。任意输入一个商品的编号,打印出所有相关信 息后,可对某一项信息进行修改并保存。6商品信息的计算并排序。计算所有商品的总价格及平均价格( aver,单精度,输出一位小数),将包括所有数据的数组元素按价格从高到低的顺序排序打印出课程设计思路及设计流程图主函数的流程图my modify模块的流程图(E)程序调试分析 :( 1)、在主菜单中选择 1,程序能否进入录入信息管理模块,增加玩数据后系统 中总的信息是否有相应的增

3、加。 此后输入的字符能控制是继续录入还是返回主菜 单,进行其他操作。( 2)、在主菜单中选择 2,程序能否进入删除信息管理模块,删除完数据后系统 中的信息量是否做相应的变化。 此后输入的字符能控制是继续录入还是返回主菜 单,进行其他操作。( 3)、在主菜单中选择 3,程序能否进入浏览信息管理模块,并输出要浏览的信 息此后输入的字符能控制是继续录入还是返回主菜单,进行其他操作。 (4)、在主菜单中选择 4 、程序能否进入修改信息管理模块, 当询问所要修改信 息内容时,输入 1、2、3、4 和其他数字时有相应的操作,如当输入 1 时能进行 书名的修改。此后输入的字符能控制是继续录入还是返回主菜单,

4、 进行其他操作。 (5)、在主菜单中选择 4 、程序能否进入修改信息管理模块, 当询问所要修改信 息内容时,输入 1、2、3、4 和其他数字时有相应的操作,如当输入 1 时能进行 书名的修改。此后输入的字符能控制是继续录入还是返回主菜单, 进行其他操作。 ( 6)、在主菜单中选择 5,能输出总价和平均价格,并能输出按价格排序后的书 本信息总结经过不到一个星期的C语言课程设计,我对C语言有了更进一步的认识和 了解,从刚开始不知从何下笔到现在的漂亮运行, 在我们五个人一起努力下, 终 于顺利完成任务了。成功的那一刻,大家无比兴奋,四天的努力没有白费!是我 们五个人的劳动结晶。从而也使我明白要学好

5、C语言重在实践,要通过不断的上 机操作,并且练习自主设计程序才能更好的掌握它。 以前上课感觉自己学会了很 多 ,但到真正用的时候才发现没学的还有好多好多,虽然课堂上看似学会了, 可到实际操作时问题多多。 通过这次课程设计把所学的东西用在了实践上, 设计 出来一些有用的东西,感觉很有成就感,虽然在设计的过程中遇到了很多困难, 但最终都被我们解决了,从而也加强了解决问题的能力。 课程设计是培养学生综合运用所学知识 , 发现 , 提出, 分析和解决实际问题 , 锻炼 实践能力的重要环节 , 是对学生实际工作能力的具体训练和考察过程 . 随着科学 技术发展的日新日异, 软件开发已经成为当今计算机应用中

6、空前活跃的领域, 在 生活中可以说得是无处不在。 因此作为二十一世纪的大学来说掌握程序开发开发 技术是十分重要的。回顾起此次 C 语言课程设计, 至今我仍感慨颇多, 的确, 从模块单独设计到 整体调用,从理论到实践,在整整一个星期的日子里,可以说是苦多于甜,但是 可以学到很多很多的的东西, 同时不仅可以巩固了以前所学过的知识, 而且学到 了很多在书本上所没有学到过的知识。 通过这次课程设计使我懂得了理论与实际 相结合是很重要的, 只有理论知识是远远不够的, 只有把所学的理论知识与实践 相结合起来, 从理论中得出结论, 才能真正对所学知识得到应用, 从而提高自己 的实际动手能力和独立思考的能力。

7、 在设计的过程中遇到问题, 可以说得是困难 重重,这毕竟第一次做的, 难免会遇到过各种各样的问题, 同时在设计的过程中 发现了自己的不足之处, 对以前所学过的知识理解得不够深刻, 掌握得不够牢固, 通过这次课程设计之后,对以前所学过的知识做了重新温故。参考书目 :1谭浩强,C程序设计,北京,清华大学出版社, 2007年2王为青 张圣亮,C语言实战105例,北京,人民邮电出版社, 2009年附录:程序代码#include#include#include#define MAX_NUM 100struct goods char num10;char name10;float in_pri;float

8、 sell_pri;int in_count;int s_count;float income;int surplus;float profit;recordMAX_NUM;void printPrMenu();void mycreate(struct goods *p,int *n);char myedit(struct goods *p,int *n);void printMenuB();void myadd(struct goods *p,int *n);void mydelete(struct goods *p,int *n);void del_num(struct goods *p,

9、int *n);void del_name(struct goods *p,int *n);void mymodify(struct goods *p,int n);void mystatistics(struct goods *p,int n);char mysearch(struct goods *p,int n);void printMenuC();void sch_name(struct goods *p,int n);void sch_surplus(struct goods *p,int n);void printMenuD();void mydisplay1(int n);voi

10、d mydisplay2(int n);void mydisplay3(int n);char Loop();void swap(struct goods* elm1,struct goods* elm2);void main()char choose,yes_no;int n=0;while(1)clrscr();printPrMenu();choose=getch();switch(choose)case1: clrscr();do mycreate(record,&n);yes_no=Loop();while(yes_no=Y|yes_no=y);break;case2: clrscr(

11、);if(n=0)it!n);printf(nnnnnDidnt have the records! please create printf(press any key to continue.);getch();break;elsedochar select;select=myedit(record,&n);if(select=0)return;else if(select=4)break;elseyes_no=Loop();while(yes_no=Y|yes_no=y);break;case3: clrscr();if(n=0)printf(nnnnn Didnt have there

12、cords! please create it!n);printf(press any key to continue.);getch();break;elsemystatistics(record,n);printf(npress any key to continue.); getch();break;case4: clrscr();if(n=0)printf(nnnnn Didnt have therecords! please create it!n);printf(press any key to continue.);getch();break;elsedochar select;

13、 select=mysearch(record,n); if(select=0) return;else if(select=3)break;elseyes_no=Loop(); while(yes_no=Y|yes_no=y);break;case5: clrscr();if(n=0)printf(nnnnn Didnt have therecords! please create it!n);printf(press any key to continue.);getch();break;else char choose1;docontinue.);continue.);continue.

14、);illegal choose!n ,choose);clrscr(); printMenuD(); choose1=getch(); switch(choose1)case 1: clrscr();mydisplay1(n); printf(npressanycase 2:getch(); break; clrscr(); mydisplay2(n); printf(npressanycase 3:getch(); break; clrscr(); mydisplay3(n); printf(npressanycase 4:case 0: default:getch(); break;cl

15、rscr();break; return;clrscr(); printf(nnnnn%c isif(choose1!=4) yes_no=Loop();elseyes_no=n;while(yes_no=Y|yes_no=y);break;case0: break;default: clrscr();printf(nnnnn IllegalPlease input again!n);keykeykeychoice!tototobreak;if(choose=0) break;void printPrMenu()printf(nnnnnn);printf(| |n);printf( | cho

16、ose a number(0-5): |n);printf(| |n);printf(| 1 please create the information of goods|n);printf(| 2 please edit the information of goods|n);printf(| 3 pleaseadd up thesell informationofgoods|n);printf(| 4 pleasesearch theinformationofgoods|n);printf(| 5 pleasedisplay theinformationofgoods|n);printf(

17、| 0 exit|n);printf(|n);printf(|n);printf( You choice is:);void mycreate(struct goods *p,int *n)printf(n Please input the %d record:n,(*n)+1);printf( goods number:);scanf(%s,p*n.num); printf( goods name:); scanf(%s,p*n.name); printf( enter price:); scanf(%f,&p*n.in_pri); printf( sell price:); scanf(%

18、f,&p*n.sell_pri); printf( stock count:); scanf(%d,&p*n.in_count); printf( sell count:); scanf(%d,&p*n.s_count); p*n.income=p*n.sell_pri*p*n.s_count;p*n.surplus=p*n.in_count-p*n.s_count; p*n.profit=p*n.income-p*n.in_pri*p*n.s_count;(*n)+;char myedit(struct goods *p,int *n)char choose;while(1)clrscr()

19、;printMenuB(); choose=getch(); switch(choose) case 1: clrscr();myadd(p,n);break;case 2: clrscr();mydelete(p,n);break; case 3: clrscr();mymodify(p,*n);break;case 4: break;case 0: clrscr();break;default: clrscr();printf(nnnnnchoose!n ,choose);return choose;%c is illegalvoid printMenuB()printf(nnnnnn);

20、printf(|* | n);printf( | please input | n);printf(the number of the chooses(0-4):*| n);printf( | 1 add the new goodsn);printf(| 2 delete the goodsn);printf(| 3 modify the goodsn);printf(| 4 returnn);printf(| 0 exitn);printf(* rHprintf( You choice is:); void myadd(struct goods *p,int *n)char c;struct

21、 goods *q,temp;doprintf(n please input dogets(temp.num); while(strcmp(temp.num,)=0);printf( please input new name :); gets(temp.name);printf( please input new enter price:); scanf(%f,&temp.in_pri);printf( please input new sell price:); scanf(%f,&temp.sell_pri);printf( please input new stock count:);

22、 scanf(%d,&temp.in_count);printf( please input new sell count:); scanf(%d,&temp.s_count); temp.income=temp.sell_pri*temp.s_count; temp.surplus=temp.in_count-temp.s_count; temp.profit=temp.income-temp.in_pri*temp.s_count;for(q=p;qnum)=0) printf(n number is already exist,Do you want to input a new num

23、ber (Y/N)?);doc=getche();while(c!=Y&c!=y&c!=N&c!=n);putchar(n);break;if(q=p+(*n) *q=temp;(*n)+;break;while(c=y|c=Y);void mydelete(struct goods *p,int *n) char c;printf(n Do you want delete it by number(b) or name(m)?);c=getch();if(c=b|c=B)del_num(p,n);else if(c=m|c=M)del_name(p,n);else printf(n the

24、words is illegal !n);void del_num(struct goods *p,int *n)char tempnum10;struct goods *q,*k;printf(n please input the number you want to delete :);scanf(%s,tempnum);for(k=p;knum)=0) break;if(kp+(*n) for(q=k;qk+(*n)-1;q+)*q=*(q+1);(*n)-;else printf(n there isnt the goods!n);void del_name(struct goods

25、*p,int *n) char tempname10;struct goods *q,*k;printf(n please input the name you want to delete :); scanf(%s,tempname);for(k=p;kname)=0) break;if(kp+(*n) for(q=k;qk+(*n)-1;q+)*q=*(q+1);(*n)-;else printf(n there isnt the goods!n);void mymodify(struct goods *p,int n)char c;struct goods *q,*find,temp;t

26、oprintf(n please input the goods number want modify :);scanf(%s,temp.num);for(q=p;qnum)=0) find=q;break;if(q=p+n)printf(n there havent the number!n);else do printf(n please input right number :);doscanf(%s,temp.num); while(strcmp(temp.num,)=0);printf( goods name:);scanf(%s,temp.name);printf( enter p

27、rice:);scanf(%f,&temp.in_pri); printf( sell price:);scanf(%f,&temp.sell_pri); printf( stock count:);scanf(%d,&temp.in_count);printf( sell count:);scanf(%d,&temp.s_count);temp.income=temp.sell_pri*temp.s_count; temp.surplus=temp.in_count-temp.s_count; temp.profit=temp.income-temp.in_pri*temp.s_count;for(q=p;qnum)=0)&(q!=find)printf(n number is already exist,Do youwant to input a new number (yes /no)? );doc=

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1