Problem Description
Three input letters, alphabetical three letters sequentially outputs
Entry
Three letters
Export
Output alphabetically
Sample input
cba
Sample Output
abc
AC Code
#include <iostream>
#include<algorithm>
using namespace std;
int main()
{
char a[3];
for(int i = 0; i < 3; i++)
{
cin >> a[i];
}
sort(a,a+3);
for(int j = 0; j < 3; j++)
{
cout << a[j];
}
return 0;
}