2012年9月15日

编程练习13

摘要: 1 //------------------------------------------------------------------ 2 //堆排序:关键是堆的构建和堆的调整,而堆的构建本质上也是堆的调整 3 //------------------------------------------------------------------ 4 #include <iostream> 5 using namespace std; 6 7 void swap(int* a,int* b) 8 { 9 if(*a!=*b)10 {11 *a=*a^*... 阅读全文

posted @ 2012-09-15 14:44 lyncre 阅读(140) 评论(0) 推荐(0)

编程练习12

摘要: 字符的替换 1 //将拼音yiersansiwuliuqibajiu转化为123456789 2 #include <iostream> 3 #include <string> 4 5 using namespace std; 6 7 char* s[9]={"yi","er","san","si","wu","liu","qi","ba","jiu"}; 8 9 void fun(char* 阅读全文

posted @ 2012-09-15 14:42 lyncre 阅读(182) 评论(0) 推荐(0)

导航