摘要:
1 #include 2 #include 3 using namespace std; 4 5 /*计算一个整数的二进制中1的个数*/ 6 int NumberOf1( int n) { 7 int count = 0; 8 9 while (n) {10 11 ... 阅读全文
posted @ 2014-06-05 14:36
soul390
阅读(196)
评论(0)
推荐(0)
摘要:
1 #include 2 #include 3 using namespace std; 4 5 6 int RandomInRange(int start, int end) { 7 srand((unsigned)time(NULL)); 8 int value = ran... 阅读全文
posted @ 2014-06-05 11:33
soul390
阅读(725)
评论(0)
推荐(0)
摘要:
1 #include 2 using namespace std; 3 4 void replace(char ch[]) { 5 int count = 0; 6 int len = 0; 7 char *p = ch; 8 while(*p != '\0') ... 阅读全文
posted @ 2014-06-05 09:02
soul390
阅读(173)
评论(0)
推荐(0)

浙公网安备 33010602011771号