You are on page 1of 1

#include <stdio.

h>
#include <conio.c>
#include <string.h>
void leer(char P[10]){
printf("DIGITE PALABRA: ");
gets(P);
}
void orden(char P[10]){
int i,j,y;
char a;
y=strlen(P);
for(i=0;i<y;i++){
for(j=0;j<y;j++){
if(P[i]<P[j]){
a=P[i];
P[i]=P[j];
P[j]=a;
}
}
}
for(i=0;i<y;i++){
printf("%c ",P[i]);
}
}
int main()
{
char P[10];
leer(P);
orden(P);
system("PAUSE");
return 0;
}

You might also like