Presentation is loading. Please wait.

Presentation is loading. Please wait.

Program Flow CSCE 121 J. Michael Moore.

Similar presentations


Presentation on theme: "Program Flow CSCE 121 J. Michael Moore."— Presentation transcript:

1 Program Flow CSCE 121 J. Michael Moore

2 Structured Programming
Programmers used to use ‘goto’ a lot. This is universally considered BAD PRACTICE. This resulted in “Spaghetti code” that was hard to follow / understand / debug. Structured programming saw all programs as composed of three control structures. While not the only programming paradigm, aspects of structured programming still apply today.

3 Control Structures Sequence Selection Iteration

4 Sequence Selection Iteration Control Structures
The ordering of statements Can include function calls Essentially no “Decisions” are made.

5 Sequence Selection Iteration Control Structures Also called branching
Allows a block of code to be executed or not based on a “Decision/Question” Allows for different paths through the code

6 Sequence Selection Iteration Control Structures Also called looping
Allows a block of code to be run repeatedly until a condition is satisfied


Download ppt "Program Flow CSCE 121 J. Michael Moore."

Similar presentations


Ads by Google