C/C++の宿題を片付けます 104代目
at TECH
600:デフォルトの名無しさん
08/03/14 17:43:58
>>599
ほいよ
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int cmp(const void*a,const void*b){return strcmp(a,b);}
int main(void){
char * month[]={"january" ,"february", "march","april","may","june","july"};
const int N = sizeof month / sizeof * month;
int i;
qsort(month , N , sizeof * month , cmp);
for(i=0;i<N;++i){
const char*it;
for(it=month[i];*it;++it)putchar(toupper(*it));
puts("");
}
return 0;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4969日前に更新/299 KB
担当:undef