第1类 按结构体成员筛选并排序(The first type is filtered and sorted by the members of the structure).docVIP
- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
第1类 按结构体成员筛选并排序(The first type is filtered and sorted by the members of the structure)
第1类 按结构体成员筛选并排序(The first type is filtered and sorted by the members of the structure)
The first type is filtered and sorted by the members of the structure
There are 1. known 100 product sales records in the IN.DAT file, each product sales records by the product code DM (character 4), the product name MC (character 10), DJ (integer), unit number SL (integer), the amount of JE (long) part. Where: amount = unit price * quantity. The function ReadDat () functions to read the 100 sales records and to store them in the structure array sell. Please prepare the function SortDat (), the functional requirements: according to the product name from small to large order if the products of the same name, are arranged according to the amount of the final results are arranged from small to large, sell into the structure of the array, the last call to WriteDat () the output to the file OUT.DAT.
Answer: void, SortDat ()
{int, I, j;
PRO temp;
For (i=0; i99; i++)
For (j=i+1; j100; j++)
If (StrCmp (sell[i].mc, sell[j].mc) 0)
{temp=sell[i];
Sell[i]=sell[j];
Sell[j]=temp;
}
Else if (StrCmp (sell[i].mc, sell[j].mc) ==0)
If (sell[i].jesell[j].je)
{temp=sell[i];
Sell[i]=sell[j];
Sell[j]=temp;
}
}
2. it is known that there are 100 product sales records in the file IN.DAT...... The functional requirements: according to the product name from big to small order, if the products of the same name, according to the amount from big to small order, the final results are arranged into the structure of the array of sell, the last call to WriteDat () the output to the file OUT.DAT.
Answer: void, SortDat ()
{int, I, j;
PRO temp;
For (i=0; i99; i++)
For (j=i+1; j100; j++)
If (StrCmp (sell[i].mc, sell[j].mc) 0)
{temp=sell[i];
Sell[i]=sell[j];
Sell[j]=temp;}
Else if (StrCmp (sell[i].mc, sell[j].mc) ==0)
If (sell[i].jesell[j].je)
{temp=sell[i];
Sell[i]=sell[j];
Sell[j]=temp;
}
}
3. it is known that there are 100 product sales records in the file IN.DAT...... The functional requirements: according to the pr
您可能关注的文档
- 液晶材料(Liquid crystal material).doc
- 消防员火场心理问题(Fireman; fire scene; psychological problem).doc
- 液晶的头文件(LCD header file).doc
- 液晶相关VCC、VDD、VSS、V0(Liquid crystal related VCC, VDD, VSS, V0).doc
- 液晶电视工程模式进入方法(Liquid crystal TV engineering mode entry method).doc
- 液晶算法(Liquid crystal algorithm).doc
- 液晶维修经验(LCD maintenance experience).doc
- 淄博历史人物(Historical figures of Zibo).doc
- 液晶触摸一体机(Liquid crystal touch integrated machine).doc
- 淄河中学 翟淑静(The Zihe River middle school Zhai Shujing).doc
- 章义伍《如何打造高绩效团队》(Zhang Yiwu's how to build high performance teams).doc
- 第2章 心理辅导内容(The second chapter, psychological counseling content).doc
- 第3章建筑防火与安全疏散(The third chapter is building fire prevention and safety evacuation).doc
- 第4章 例题(子查询和group by子句)(The fourth chapter is the example (subquery and group by clause)).doc
- 第6次重组若失败将暂停上市(If the sixth reorganization fails, the listing will be suspended).doc
- 第6章 函数设计(The sixth chapter, function design).doc
- 第8章 电子商务项目与项目管理软件(The eighth chapter is e-commerce project and project management software).doc
- 第4课 夏、商、西周的兴亡(The rise and fall of fourth class Xia, Shang and Western Zhou Dynasty.).doc
- 空资料主板(Null data board).doc
- 第9章 竞争性市场营销战略(The ninth chapter is competitive marketing strategy).doc
最近下载
- 第7课《定期体检 预防常见病》(教案) - 2024—2025学年人教版(2024)初中体育与健康七年级全一册.docx
- 2025林地分等定级规程.pdf VIP
- 计算机操作系统实验-解析ELF文件.doc VIP
- 智能建造技术在桥梁施工中的应用.pptx VIP
- Unit3KeepFitSectionBProject课件人教版英语七年级下册.pptx VIP
- HGT3809-2023工业溴化钠(报批稿).pdf VIP
- 小红书商业模式分析.pptx VIP
- 铜的电阻率热导率比热值热膨胀系数及杨氏模量.pdf VIP
- 第7课++定期体检+++预防常见病++课件++2024—2025学年人教版(2024))初中体育与健康七年级全一册.pptx VIP
- 粉尘爆炸重大事故隐患判定标准(图文并茂第一版)精品.pdf
原创力文档


文档评论(0)