[功能更新] 新增支持mermaid
如题, 现在可以在纪念版使用mermaid标签来绘制流程图啦!例子:
flowchart TD
Start(["开始"]) --> Init["初始化变量
count=0, total=0"]
Init --> LoopStart{"count < 5 ?"}
LoopStart -- 是 --> Input["输入数字
num"]
Input --> CheckNum{"num > 0 ?"}
CheckNum -- 是 --> ProcessPositive["正数处理
total = total + num"]
CheckNum -- 否 --> ProcessNegative["负数处理
total = total - abs(num)"]
ProcessPositive --> Increment
ProcessNegative --> Increment
Increment["count = count + 1"] --> LoopStart
LoopStart -- 否 --> Calculate["计算平均值
avg = total / 5"]
Calculate --> Output["输出结果
total, avg"]
Output --> End(["结束"])
flowchart TD
Start(["开始"]) --> Init["初始化变量
count=0, total=0"]
Init --> LoopStart{"count < 5 ?"}
LoopStart -- 是 --> Input["输入数字
num"]
Input --> CheckNum{"num > 0 ?"}
CheckNum -- 是 --> ProcessPositive["正数处理
total = total + num"]
CheckNum -- 否 --> ProcessNegative["负数处理
total = total - abs(num)"]
ProcessPositive --> Increment
ProcessNegative --> Increment
Increment["count = count + 1"] --> LoopStart
LoopStart -- 否 --> Calculate["计算平均值
avg = total / 5"]
Calculate --> Output["输出结果
total, avg"]
Output --> End(["结束"])
没有预渲染吗?画面有跳变
页:
[1]