回复 8楼 voidx
si[i][1] == idx;这个是什么意思 你的idx指的是??
2011-06-06 19:12
2011-06-06 19:31
2011-06-06 20:15
2011-06-06 20:18
2011-06-06 21:14
2011-06-07 00:08
2011-06-07 00:14
程序代码:#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main(){
int i=0,j=0;
char *str=(char *)calloc(100,sizeof(char)),middle;
gets(str);
while(str[j]!='\0'){
while(str[i]!='\0'&&str[i+1]!='\0'){
if(str[i]>str[i+1]){
middle=str[i];
str[i]=str[i+1];
str[i+1]=middle;
}
i++;
}
i=0;
j++;
}
printf("%s\n",str);
return 0;
}
[local]1[/local]

2011-06-07 08:48
2011-06-08 14:40