Ir ao conteúdo
  • Cadastre-se

lonkobin

Membro Júnior
  • Posts

    2
  • Cadastrado em

  • Última visita

  1. #include <stdio.h> #include <stdlib.h> #include <string.h> char* strsort(char str[]){ int i,j; char c; for(i=0;i<strlen(str);i++){ for(j=0;j<strlen(str);j++){ if(str[j]<str[j+1]){ c = str[j]; str[j] = str[j+1]; str[j+1] = c; } } } return str; } int main(){ char str[10] = "huasdg"; printf("%s",strsort(str)); }
  2. #include <stdio.h> #include <stdlib.h> #include <string.h> char* strsort(char str[]){ int i,j; char c; for(i=0;i<strlen(str);i++){ for(j=0;j<strlen(str);j++){ if(str[j]<str[j+1]){ c = str[j]; str[j] = str[j+1]; str[j+1] = c; } } } return str; } int main(){ printf("%s",strsort("huasdg")); }

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...