Markdown绘制流程图的方法
用Markdown绘制流程图十分简单方便,下面以几个例子来介绍其使用方法
Example1闰年判断
在编辑器中输入如下代码,
Created with Raphaël 2.1.0 Start 输入年份n n能否被4整除? n能否被100整除? n能否被400整除? 输出非闰年 End 输出闰年 输出闰年 输出非闰年 yes no yes no yes no即可得到下面的流程图,其中start表示开始,condition表示条件判断,inputoutput表示输入输出,end表示结束。注意声明时,冒号后面必须加空格,如:st=>start: Start
Example2子程序
在编辑器中插入代码
Created with Raphaël 2.1.0 http://www.baidu.com start http://www.baidu.com 操作1 YES or NO? End 子程序 yes no如上所示,subroutine表示子程序,sub(right)可定义连接点的位置,同时st=>start: start:>http://www.baidu.com 还可以在方块上插入超链接。
Example3
在编辑器中插入代码
Created with Raphaël 2.1.0 http://www.baidu.com Start http://www.baidu.com My Operation http://www.google.com Yes or No http://www.google.com Good idea catch something... http://www.baidu.com Ende http://www.baidu.com Stuff My Subroutine yes no yes no