C/C++の宿題片付けます 131代目at TECH
C/C++の宿題片付けます 131代目 - 暇つぶし2ch235:デフォルトの名無しさん
09/10/23 12:56:45
>>230

#include<stdio.h>
#include<string.h>
int main()
{
char *colors[]={"Red", "Green", "Blue"};
int input;
char *nums[]={"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};
char b[80];

gets(b);
for(input=0;input<11;input++)if(!strchr(b,"0123456789"[input]))printf("終了します\n"),return 0;
for(input=0;input<11;input++)if(!strcmp(b,nums[input]))break;
if(input<4){
printf("%s\n", colors[input]);
}else if(input<10){
printf("終了します\n");
}
return 0;
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch