Untitled
raw download clone
CPP
views 15
,
size 421 b
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
    char cuv[1001];
    cin>>cuv;
    int n = strlen(cuv);
    
    char aux;
        for(int i=0;i<n - 1;i++)
            for(int j=i+1;j<n;j++)
                if(cuv[i]>cuv[j])
                {
                    aux=cuv[i];
                    cuv[i]=cuv[j];
                    cuv[j]=aux;
                }
    cout<<cuv;
}
close fullscreen
Login or Register to edit or fork this paste. It's free.