Definitions

An algorithm is a set of precisely defined steps to calculate an answer to a problem or set of problems, and which is guaranteed to arrive at such an answer eventually. As this implies, a set of steps that might never end is not an algorithm.

Programming is the art and science of solving problems by the following procedure:[3]

[3] This definition is possibly somewhat misleading since it implies that the development of a program is straightforward and linear, with no revisions required. This is known as the "waterfall model" of programming, since water going over a waterfall follows a preordained course in one direction. However, real-life programming doesn't usually work this way; rather, most programs are written in an incremental ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.