下载此文档

计算机专业英语教程ch05:Programming Language.pdf


文档分类:IT计算机 | 页数:约35页 举报非法文档有奖
1/35
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/35 下载此文档
文档列表 文档介绍







 
   
puter scientist Niklaus Wirth stated that:
Programs = Algorithms + Data
The algorithm is part of the blueprint or plan for puter program; an algorithm is:
"An effective procedure for solving a problem in a finite number of steps."
It is effective, which means that an answer is found and it finishes, that is it has a finite
number of steps. A well-designed algorithm will always provide an answer, and it may not be the
answer you want but there will be an answer. It may be that the answer is that there is no answer.
A well-designed algorithm is also guaranteed to terminate.
The key features of an algorithm are:
Sequence (also known as Process),
Decision (also known as Selection)
Repetition (also known as Iteration or Looping)
In 1964 the mathematicians Corrado Bohm and Guiseppe Jacopini demonstrated that any
algorithm can be stated using sequence, decision and repetition. The work of Bohm and Jacopini
was of great importance since it eventually led to the disciplines of structured program design
that are much used today.
Sequence means that each step or process in the algorithm is executed in the specified order.
In an algorithm each process must be in the correct place, otherwise the algorithm will most
probably fail.
The Decision constructs4If ... then, If ... then ... else ...
In algorithms the e of a decision is either true or false, and there is no in between.
The e of the decision is based on some condition that can only result in a true or false
value[1].
The decision takes the form: if proposition then process
A proposition in this sense is a statement, which can only be true or false. It is either true
that today is Wednesday or false that today is Wednesday. It can't be both true and false. If the
proposition is true then the process, which follows the then, is executed.
The decision can also be stated as:
if proposition

计算机专业英语教程ch05:Programming Language 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数35
  • 收藏数0 收藏
  • 顶次数0
  • 上传人紫岑旖旎
  • 文件大小0 KB
  • 时间2012-07-15