C语言对字符串中的字符按照字母顺序和数字顺序重新排列?

日期:2019-10-06 16:03:24 人气:1

C语言对字符串中的字符按照字母顺序和数字顺序重新排列?

#include #include #include #include int main(){ char s[100],C[100],c[100],n[100],rC=0,rc=0,rn=0; scanf("%s",s); int lenth=strlen(s); std::sort(s,s+lenth); for(int i=0;i<lenth;++i){ if(s[i]>='0' and s[i]<='9
    A+
热门评论