Data descriptions involve identifying, assigning a name, and assigning a type to every data item used in the problem solution. Data items are variables and constants. The names for the data items must be unique, because they reference a particular data item. The general data types are numeric and string. The numeric types can be integer or real.
An algorithm is a precise, detailed, and complete description of a solution to a problem. The basic design notations to describe algorithms are flowcharts and pseudo-code. Flowcharts are a visual representation of the execution flow of the various instructions in the algorithm. Pseudo-code is more convenient to describe small to large algorithms; it is closer to writing an actual program.
The building blocks for designing and writing an algorithm are called design structures. These are sequence, selection, repetition, and input-output. Several pseudo-code statements are introduced in this chapter, the assignment statements, arithmetic statements, and input/output statements.