上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 48 下一页
摘要: C_C++_WY_01. 字符倒叙输出 题目描述: 编写一个函数,将字符串中的每个单词的倒序输出,字符串中以空格分割各个单词,如果碰到数字则跳过。 要求实现函数: void vConvertMsg(char *pInputStr, long lInputLen, char *pOutputStr); 【输入】 char *pInputStr:指向一个字符串的指针 long lInpu... 阅读全文
posted @ 2013-07-19 16:41 helloweworld 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 12345678910111213141516 intmain(){ char str1[] = "1234"; cout << sizeof(str1) << endl; //5 char str2[6] = "1234"; cout << sizeof(str2) << endl; //6 int array1[] = {1,2,3,4}; cout << sizeof(array1... 阅读全文
posted @ 2013-07-19 16:31 helloweworld 阅读(268) 评论(0) 推荐(0) 编辑
摘要: C_C++_WY_01. 统计排序 题目描述: 编写一个函数,计算出字符串中各种字母(a~z,A~Z)的个数,AABB输出A2B2,aabbCCAAA输出A3C2a2b2,输出结果需要按照字母排序(大写的比小写的排在前面) 要求实现函数: void vConvertMsg(char *pInputStr, long lInputLen, char *pOutputStr); 【输入】 ... 阅读全文
posted @ 2013-07-19 11:56 helloweworld 阅读(351) 评论(0) 推荐(0) 编辑
摘要: C_C++_XY_01.整理数字字符串 题目描述: 输入一个包含若干整数的字符串,负数前面带有负号‘-’,正数不带‘+’,每个整数都是个位数。 请将此串进行如下整理: 1、 将串中的正负数分离,使得负数在前,正数在后; 2、 分离后的正负数分别保持在原串中的相对顺序不变; 3、 输出参数为整理后的字符串。 当输入串格式非法,不作处理,直接输出原有字符串。 要求实现函数: void... 阅读全文
posted @ 2013-07-19 10:50 helloweworld 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(968) 评论(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 阅读(1020) 评论(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) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 48 下一页