عربي  Mark    Scores  Software

 

  Previous (Page 6)Next (Page 8)
Describing a Program Function: Flowcharting and Pseudo-Code
   Flowcharting symbols. Any program function is constructed out of these three basic structures. Flowchart of a program function that computes the factorial of an input number. Flowchart of a program function that sums 1+2+3+...+10.



Any program function is constructed out of three basic structures: sequence structure, selection (if-then-else) structure, and repetition structure (looping or do-while). In a sequence structure, program instructions are executed in sequence, one after the other. In a selection structure, one of two instruction sets is selected for execution based upon whether a certain condition is satisfied or not. In a repetition structure, a set of instructions is repeatedly executed as long as a certain condition is satisfied. Two typical methods for describing steps of a program function are flowcharting and pseudo-code. Flowcharting uses geometric symbols to graphically describe function steps. Different symbols describe different actions. In other words, this method provides a chart describing the program flow. Pseudo-code uses English-like statements to describe function steps.  
Page 7 of 16

Previous (Page 6)Next (Page 8)