Files
fzu-product/3.编程思维体系构建/3.4.6.1.开始冒险.md
2023-04-14 15:41:04 +08:00

31 lines
679 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 1.开始冒险
让我们从一个最基本的函数开始
```c
#include <stdio.h>
int main()
{
printf("Welcome to Little Cave Adventure.\n");
printf("It is very dark in here.\n");
printf("\nBye!\n");
return 0;
}
```
输出样例:
Welcome to Little Cave Adventure.
It is very dark in here.
Bye!
尽管可能微不足道,但该程序确实展示 <em>了</em>任何文本冒险中最重要的方面:描述性文本。一个好的故事是制作一款好的冒险游戏的要素之一。
# 为什么要用英文?
因为中文的编码模式可能会带来奇怪的影响。
思考题:大家可自行去了解 utf-8GDB 等编码模式及其历程