![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++
文章平均质量分 64
zibuyuyeye
游戏、软件开发
展开
-
不吉利的数字
一些普通的数字在很多人眼里是不吉利。如数字4,谐音“死”,所以很多地方都没有带4的数字:比如新校区澡堂衣柜编号及没有4;再如数字13,在西方人眼中代表着坏运气,也是不吉利的数字,13不出远门,楼层不设第13层等等。假如某些人认为0是不吉利的数字,并且在他们以后的生活中,记录数据都在不在使用含有0的自然数。他们记录数的序列是1,2,3,4,5,6,7,8,9,11,12,13,14,15原创 2014-09-03 13:18:39 · 2443 阅读 · 0 评论 -
把字符串按字典顺序排序
解1:#include #include #include #include #include using namespace std;bool comparator(string a, string b){ char c1,c2; for(int i = 0 ; i { if((c1 = tolower(a[i])) != (c2 = tolo原创 2014-09-03 13:44:02 · 2622 阅读 · 0 评论 -
money
小明上小学了,妈妈要教他怎么算钱了,妈妈给小明三种钱币,分别为一角、两角、五角的,现在妈妈给小明n块钱,要求小明把这n块钱换成由一角、两角、五角组成的,可是小明不知道到底存在多少种换法,聪明的你能帮助他吗?#includeusing namespace std;int main() { int i, j, k, n; cin >> n; while(n--) {原创 2014-09-03 13:38:45 · 502 阅读 · 0 评论 -
Old Calculator
Old Calculator 时间限制:1000 ms | 内存限制:65535 KB 难度:1描述 szhhck have an old calculator bought 5 years ago.he find the old machine can just calculate expressions like this : A-B、A+B、A*B、A/B、A%原创 2014-09-03 13:45:59 · 309 阅读 · 0 评论 -
strstr()的实现
#include const char *my_strstr(const char *str, const char *sub_str) { for(int i = 0; str[i] != '\0'; i++) { int tem = i; //tem保留主串中的起始判断下标位置 int j = 0;转载 2014-11-10 19:34:04 · 324 阅读 · 0 评论