文章
2
粉丝
0
获赞
8
访问
387
//c语言插入排序
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char g(char c){
if(c>='A'&&c<='Z') return c+32;
else if(c>='a'&&c<='z') return c;
return '.';
}
int main(){
char s[10000];
while(gets(s)){
int len=strlen(s);
int i,j,k;
for(i=1;i<len;i++){
if(!((s[i]>='a'&&s[i]<='z')||(s[i]>='A'&&s[i]<='Z'))) continue;//跳过非字母
char tmp=s[i];
k=i;//k记录前一字母位置
for(j=i-1;j>=0;j--){
&...
登录后发布评论
暂无评论,来抢沙发