摘要: C_C++_XY_03.求最小张数换零钱算法 题目描述: 假设1元,5元,10元,50元,100元的人民币若干,实现一个能找到最少张数累计达到一个指定金额方法。 如:67元,可分为67个1元钱。也可分为6个10元7个1元 其中最少人民币分法为一张50元,一张10元,一张5元,两张1元,五张不同金额的拆分方法为最最少张数拆分法 要求实现函数: void CalLeastChange(lo... 阅读全文
posted @ 2013-07-16 19:59 helloweworld 阅读(969) 评论(0) 推荐(0) 编辑
摘要: C_C++_XY_08.拼写检查程序 题目描述: 请设计一个自动拼写检查函数,对输入单词的错误依据字典进行修正。 1. 输入为一个单词和一组字典单词,每个单词长度不超过9位; 2. 若字典中没有与输入相同的单词,认为输入单词错误,需要从字典中选择一个修正单词; 3. 修正要求:与输入单词长度相同,且单词中不同字符数最少; 4. 存在多个修正单词时,取字典中的第一个; 5. 输出修正后... 阅读全文
posted @ 2013-07-16 19:42 helloweworld 阅读(568) 评论(0) 推荐(0) 编辑
摘要: http://www.cppblog.com/mydriverc/articles/33991.html 12345678910111213 intmain(){ string str = "0101"; bitset b1(str); bitset b2(5); cout << b2[3] << endl; cout << b2[2] << endl; cout << b2[1] <... 阅读全文
posted @ 2013-07-16 18:15 helloweworld 阅读(235) 评论(0) 推荐(0) 编辑
摘要: C_C++_XY_09.数字字符串转二进制 题目描述: 输入一个三个数字的字符串,请将此串进行如下整理: 将字符串转换成数字,转换为二进制数,如果倒数第三位是“0”,则输出“0”,如果是“1”,则输出“1”。 比如,输入字符串“240”,转换为二进制为“11110000”,它的倒数第三位是“0”,所以输出是“0”. 要求实现函数: void ArrangeString(const ch... 阅读全文
posted @ 2013-07-16 18:07 helloweworld 阅读(1036) 评论(0) 推荐(0) 编辑
摘要: C_C++_BJH_01. Capitalize the First Letter Description: Design a function that meets the following requirements: l Capitalize the first letter of each word in a character string. l If the first let... 阅读全文
posted @ 2013-07-16 15:37 helloweworld 阅读(307) 评论(0) 推荐(0) 编辑
摘要: C_C++_WP_04. Remove Particular Elements in an Array Description: Input an array, in which each element must be greater than 0 and less than 999. Then, remove following elements: l Elements that can... 阅读全文
posted @ 2013-07-16 11:56 helloweworld 阅读(223) 评论(0) 推荐(0) 编辑