> For the complete documentation index, see [llms.txt](https://docs.1l.lol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1l.lol/computer-basics/flowchart.md).

# 流程图

### 流程图的作用

流程图用标准图形符号描述算法的执行流程，比自然语言更直观、更严谨。

### 常用符号

| 符号        | 名称    | 作用                |
| --------- | ----- | ----------------- |
| 椭圆 / 圆角矩形 | 起止框   | 表示开始、结束           |
| 平行四边形     | 输入输出框 | 表示输入或输出           |
| 矩形        | 处理框   | 表示赋值、计算等操作        |
| 菱形        | 判断框   | 表示条件判断，有“是/否”两条分支 |
| 箭头        | 流程线   | 表示执行方向            |

### 三种基本结构的流程图

* **顺序结构**：从上到下依次执行
* **分支结构**：遇到菱形判断框，根据条件走不同分支
* **循环结构**：箭头回指形成回路，配合判断框控制是否继续

### 示例：判断一个数是否为正数

```
开始
 ↓
输入 n
 ↓
◇ n > 0 ?
 是 → 输出“正数”
 否 → 输出“非正数”
 ↓
结束
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.1l.lol/computer-basics/flowchart.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
