#include <stdio.h>
#include <string.h>
#define LEN 16
int main(void)
{
char str1[LEN] = " ";
static char *direction[] = {"キタ", "ホクセイ", "ニシ", "ナンセイ", "ミナミ", "ナントウ", "ヒガシ", "ホクトウ"};
int num;
for(;;)
{
scanf("%d", &num);
switch(num)
{
case 0:
strcpy(str1, direction[0]);
break;
case 1:
strcpy(str1, direction[1]);
break;
case 2:
strcpy(str1, direction[2]);
break;
case 3:
strcpy(str1, direction[3]);
break;
case 4:
strcpy(str1, direction[4]);
break;
case 5:
strcpy(str1, direction[5]);
break;
case 6:
strcpy(str1, direction[6]);
break;
case 7:
strcpy(str1, direction[7]);
break;
}
printf("%s\n", str1);
}
return 0;
}
0 件のコメント:
コメントを投稿