C/C++の宿題を片付けます 68代目
■ このスレッドは過去ログ倉庫に格納されています
0446デフォルトの名無しさん
NGNG#include<stdio.h>
#include<stdlib.h>
int charcmp(const void* a,const void* b){return *(const char*)a-*(const char*)b;}
int main(void){char tmp[100];int len;fgets(tmp,sizeof(tmp),stdin);len=strlen(tmp);
tmp[--len]='\0';qsort(tmp,len,sizeof(char),charcmp);
printf("%s\n",tmp);return 0;}
■ このスレッドは過去ログ倉庫に格納されています