CHAPTER 1

Algorithms and Flowcharts

1.1 ALGORITHMS

In order to solve a problem using a computer, we must first express the procedure used to solve the problem in terms of computer instructions. A computer program is just a collection of these instructions, that are necessary to solve a specific problem. The approach or method that is used to solve the problem is known as an algorithm. For example, if we wish to develop a program that tests whether a number is +ve or -ve, then the set of statements which solves the problem becomes the program. The method that is used to test if the number is +ve or -ve is the algorithm. Normally, to develop a program to solve a particular problem, we first express the solution to the problem in terms of an algorithm ...

Get Programming Techniques Through C: A Beginner's Companion now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.