Algorithms , Part 1 of 3. Topics Definition of an Algorithm Example: The Euclidean Algorithm Syntax versus Semantics Reading Sections 1.4 – 1.5. The First step in the programming process. Problem Solving.
The First step in the programming process
If / else StructurePage 159 in book.
Problem: Find the largest positive integer that divides evenly into two given positive integers (i.e., the greatest common divisor).
M N R
24 9 6
9 6 3
6 3 0
So, 3 is the GCD of 24 and 9.
While loop StructurePage 214 in book.
Assign M the value of N
Assign N the value of R
I walked to the corner grocery store.
I talked to the circular grocery store.
I grocery store walked corner the to.
Flow Lines indicating the
logical sequence of statements
One must follow the flow of the
arrows direction, one cannot go
in the opposite direction of the