#include #include #include using namespace std; char a[50][50]; int n; void sort() { int i,j; char aux[50]; for(i=1;i0) { strcpy(aux,a[i]); strcpy(a[i],a[j]); strcpy(a[j],aux); } } void sort2() { int i,j,p;char aux[50]; for(i=1;i0) { strcpy(aux,a[i]); strcpy(a[i],a[j]); strcpy(a[j],aux); } } } int main() { char s[200], *p; cin.getline(s,200); p=strtok(s," "); while(p!=NULL) { n++; strcpy(a[n],p); p=strtok(NULL," "); } sort2(); cout<<"\n"; for(int i=1;i<=n;i++) cout<