⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c09_15.c

📁 it can help you know C++ souce program quckily
💻 C
字号:
#include <stdio.h>
#include <string.h>

int main()
{
	char *question = "Where are do you want to go? [1:West, 2:North , 3:Easr , 4:South]\n",
	*pwest = "West. There are a larger building.",
	*pnorth = "North. There are no way.",
	*peast="East. Go down, You can find a Magic Miror.",
	*psouth = "South. There are an old man.";
	enum location { west=1, north=2, east=3, south=4};
	enum location direction;

	puts(question);
	scanf("%d", &direction);
	switch (direction)
	{
		case  west: puts(pwest); break;
		case north: puts(pnorth); break;
		case  east: puts(peast); break;
		case south: puts(psouth); break;
		default: printf("stay here.\n"); break;
	}

	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -