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, strictly speaking, an algorithm.[3]

[3] I should note that there is some disagreement on this fine point of definition. Some people consider a procedure to be an algorithm even if it may never end.

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

[4] 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 ...

Get C++: A Dialog Programming with the C++ Standard Library 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.