Please enable JavaScript.
Coggle requires JavaScript to display documents.
Ch.23 Algorithm Design(II) - Coggle Diagram
Ch.23 Algorithm Design(II)
23.1 Input statements, output statement and assignment statements
Output statement
Can be displayed on the screen
Assignment statement
Input statement
A number
A character
A string
23.2 Basic control strutures
Iteration(復述)
WHILE-lop
DO...WHILE-loop
FOR-loop
REPEAT...UNTIL-loop
Sequence
Selection control structure(選擇控制結構)
Decision logic structure
Works much like the way humans think
● Use the
IF...THEN...ELSE
statement structure to determine what the program should do next.
Case logic structure
Usually used to make a decision from more than one possible value(多個可能值) of an expression.
Only one option is selected
The word CASE can be any data type
A special form of the decision logic structure
23.3 Algorithms for Manipulating arrays
Arrays
Initializing for an element of an array
Searching for an element of an array
23.4 Advantages of using the modular approach in programming
Can save us a lot of time
Easier to understand and debug a module
Modularization allows a team of programmers to work on a large program
Each module can be tested separately(單獨地)