题解 | #图片整理#

图片整理

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

#include <string.h>

int main()
{
    int i,j;
    char str[1026]={0},temp;
    scanf("%s",str);
    for(i=0;i<strlen(str);i++)
    {
        for(j=i+1;j<strlen(str);j++)
            if(str[i]>str[j])
            {
                temp=str[i];
                str[i]=str[j];
                str[j]=temp;
            }
    }
    printf("%s", str);
    
}
全部评论

相关推荐

点赞 评论 收藏
分享
程序员牛肉:这一眼假啊,基本上都是骗人的,不然就涉及到职位贪腐了,就像之前华为的OD事件,看你运气好不好了
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务