Page 17 - Computer Class 06
P. 17

Hence, an algorithm is a list of step-by-step instructions that are followed in order to

             get  a  task  done.  Each  instruction  should  be  very  simple  to  that  a  computer  can
             understand exactly what it needs to do.

             Let us write an algorithm to find the greater of two numbers (A and B). The steps for
             this problem is as given below.

             Step 1         :      Start
             Step 2         :      Read the values of ‘X’ and ‘Y’.

             Step 3         :      Compare these values to determine if   is greater than .X          Y

             Step 4         :      Stop

             This algorithm explains how we follow the steps in problem solving.
             1.     Formulating the problem and deciding the input data, if any.

             2.     Identifying the various steps of computation that are must for the solution.

             3.     Identifying  the  points  of  decision,  i.e.,  under  what  circumstances  a  particular
                     operation is to be performed.

             4.     Knowing the expected results and when to obtain the output.

             Flowchart

             Flowchart is a graphical representation of an algorithm. Programmers often use it as
             program-planing  tool  to  solve  a  problem.  It  makes  use  of  symbols  which  are

             connected  among  them  to  indicate  the  flow  of  information  and  processing.  The
             process of drawing a flowchart from algorithm is known as flowcharting                  .




               The first design of flowchart goes back to 1945 which was designed by John Von Neumann.



             Flowchart Symbols

             Flowcharts  use  special  shapes  to  represent  different  types  of  actions  or  steps  in  a
             process.  Lines  and  arrows  show  the  sequence  of  the  steps  and  the  relationships
             among them. These are known as flowchart symbols                .

             The various symbols used are as follows.

             Terminator Symbol                                                                       For example :

             The  oval  symbol  indicates  Start,  Stop  and
                                                                                                        Start
             Halt in a program’s logic flow. A pause/halt

             is generally used in a program logic under



                                                                                    Computer-6              17
   12   13   14   15   16   17   18   19   20   21   22