题解 | #图片整理#

图片整理

https://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941

#include <stdio.h>
#include <stdlib.h>
int cmp(const void *a,const void *b)
{
    return *(char*)a-*(char*)b;
}

int main() {
    char a, b;
    int c,f;
    char str1[1000];

    gets(str1);
    c=strlen(str1);
    qsort(str1, c, sizeof(char), cmp);
    puts(str1);

    return 0;
}

全部评论

相关推荐

投递网易雷火等公司7个岗位
点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务