Types of logic used in the flowchart

Sequential Execution: In this logic the instructions are executed one after the other sequentially.

Transfer of control: This is a logic which is used when the option to be chosen depends upon the result of the decision. The control is transferred to a particular path if the result of the decision branches to that path.

Looping: In looping or repetitive logic, an instruction or a number of instructions are executed more than once. The instructions are executed till the decision criteria is true. The decision criteria can be placed before the loop or after the loop depending upon the statements which are to be executed in the loop.

Let us see some examples of writing algorithms and flowcharts.

(1) Write an algorithm and develop a flowchart to convert the temperature input in Celsius scale to Fahrenheit scale.

Solution:

First write a detailed stepwise algorithm to do the conversion

Step 1: Start.

Step 2: Input temperature in Celsius (C).

Step 3: Convert to Fahrenheit (F) using the formula F = 9/5 * C + 32.

Step 4:Print the temperature in Fahrenheit (F). Step

5: Stop

Next on the basis of this step wise algorithm develop the flowchart using the appropriate flowchart symbols as follows: