论文部分内容阅读
描述算法共有“自然语言”、“程序框图”和“伪代码”三种方式。用自然语言表示的算法步骤有明确的顺序性,但是对于在一定条件下才会被执行的步骤,以及在一定条件下会被重复执行的步骤,自然语言的表示就显得困难。伪代码书写格式比较自由,容易表达出设计者的思想,但缺点是表达不够直观、层次结构不够醒目。相比之下,程序框图用图形的方式表达算法有更清楚的认知和视觉化效果。
There are three ways to describe the algorithm: “natural language ”, “block diagram ” and “pseudo-code ”. In natural language, the algorithm steps are well-defined, but the natural language representation is difficult for the steps to be executed under certain conditions and the steps to be executed repeatedly under certain conditions. Pseudocode writing format is relatively free, easy to express the designer's thinking, but the disadvantage is not enough intuitive expression, the hierarchy is not conspicuous. In contrast, the block diagram has a clearer perception and visualization of the algorithm in a graphical way.