Page 83 - TechPluse_C6_Flipbook
P. 83

Clickipedia



                           Ada Lovelace is credited for the evolution of the concept
                           of algorithm.




                      CHARACTERISTICS OF A GOOD ALGORITHM AND
                     FLOWCHART


                 The main characteristics of a good algorithm are:
                    Precision: Each step is precisely defined.

                    Uniqueness: Result of each step should be uniquely identified and only depend on the result
                     of the preceding step.
                    Finiteness: It should stop after a finite number of instructions are executed.

                    Input: It should have well-defined input.
                    Output: It should have well-defined output.
                    Effective: It is measured in terms of time and space.


                     USES OF AN ALGORITHM

                 Algorithm is commonly used for:

                    Performing data processing          Performing computer and mathematical operations
                    Manipulating data                   Searching for a particular data


                     WRITING AN ALGORITHM

                 The construction of the Algorithm is the stage which requires creative thinking and finding the
                 best possible combination of steps to get the result. For example,

                 A.  Algorithm to find product, sum and difference of two numbers.

                 Step 1    Start.
                 Step 2   Read two numbers and store them in A and B.

                 Step 3   Multiply two numbers A and B.
                 Step 4    Print the product.

                 Step 5   Add two numbers A and B.

                 Step 6   Print the sum.
                 Step 7   Subtract the number B from the number A.

                 Step 8   Print the difference.

                 Step 9   Stop.



                                                                                       Algorithm and Flowchart       81
   78   79   80   81   82   83   84   85   86   87   88