比这篇新的文章:
在页面中制作由下往上滚动的文字
比这篇旧的文章: StrPermutation
作者: bookine, 点击252次, 评论(0), 收藏者(0)
打分:
所有评论,共0条:( 我也来说两句)
比这篇旧的文章: StrPermutation
StrCombination
语言: C, 标签: 无 2008/08/27发布 4个月前更新作者: bookine, 点击252次, 评论(0), 收藏者(0)
C语言: StrCombination
01 //print the whole combination of a string
02 void StrCombination(char in[], char out[], int len, int rec, int start)
03 {
04 for(int i = start; i < len; ++ i)
05 {
06 out[rec] = in[i];
07 out[rec + 1] = 0;
08 printf("%s\n", out);
09 StrCombination(in, out, len, rec + 1, i + 1);
10 }
11 }
02 void StrCombination(char in[], char out[], int len, int rec, int start)
03 {
04 for(int i = start; i < len; ++ i)
05 {
06 out[rec] = in[i];
07 out[rec + 1] = 0;
08 printf("%s\n", out);
09 StrCombination(in, out, len, rec + 1, i + 1);
10 }
11 }
所有评论,共0条:( 我也来说两句)
代码