Browse over 20 million
homework answers & study documents

Prg 210 Selection Control Structures and Repetition Control Structures.

Type

Homework

Rating

Showing Page:
1/8
PRG210
Selection and Repetition Control Structures
University of Phoenix
Mike VanderMeulen
April 28, 2010

Sign up to view the full document!

lock_open Sign Up
Before scripting a program to solve a fastidious problem, it is necessary to have a
comprehensive understanding of the problem and a cautiously laid out approach to solve that
problem. When authoring a program, it is equally important to understand the types of building
blocks that are available such Algorithms, Pseudocode, and Control structures. In this paper I
will solely focus on two of the three main control structures.
Control Structures
The IRCC.edu (2006-2010) website states “for many years program analysts have been
using an approach to program design called “structured design” in which programs are
assembled like building blocks from simple “structures” that define the flow of control to be
followed by a processor when executing the program’s commands. Three simple structures have
been identified that suffice to build a solution to any complex task. These structures are known
as: Sequence, Selection, and Repetition.”
Selection Control Structures
The Selection Control Structure is used for decisions, branching and choosing between
two or more alternative paths. In C, these are the types of selection statements: if, if/else, and
switch.
Simple “IF” Statement: The IF statement supplies a simple way to branch code in
various paths based on a circumstance. When the circumstance is met, a certain piece
of code can be executed; likewise, when the condition is not met, another piece of
code can be executed. The following is an IF statement example:

Sign up to view the full document!

lock_open Sign Up

Sign up to view the full document!

lock_open Sign Up

Anonymous
Had to paraphrase some of the content but overall, really useful material.

Anonymous
Heard about Studypool for a while and finally tried it. Glad I did caus this was really helpful.

Anonymous
Just what I needed… fantastic!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4