Blogtrottr
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中
Yahoo!奇摩知識+ - 分類問答 - 電腦網路 - 發問中 
Explore DIRECTV

Enjoy HD DVR service in every room. Get every game every Sunday. Watch hit movies and shows anywhere. Bundle and save today!
From our sponsors
排列的程式加上註解
Aug 19th 2013, 01:37

請幫我把以下的程式加上註解,謝謝!

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 20
static char a[MAX];
static int co;
void gen(int n){
n++;
char tmp;
for(int i=n;i<co;i++){
tmp=a[n];
a[n]=a[i];
a[i]=tmp;
if(n==co-1)

printf("%s\n",a);
else
gen(n);
tmp=a[n];
a[n]=a[i];
a[i]=tmp;
}
}

int main(){
printf("請輸入a,b,c,d,e:\n");
scanf("%s",a);
co=strlen(a);
gen(-1);

system("pause");
return 0;
}

This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends: 'You Say What You Like, Because They Like What You Say' - http://www.medialens.org/index.php/alerts/alert-archive/alerts-2013/731-you-say-what-you-like-because-they-like-what-you-say.html

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 jmuko104 的頭像
    jmuko104

    new htc one開箱,htc手機評價,htc手機比較,htc手機遊戲,htc手機維修,htc手機價位,htc手機推薦,htc手機鈴聲,中華電信htc手機,htc手機截圖,亞太htc手機,

    jmuko104 發表在 痞客邦 留言(0) 人氣()