Page 26 - ModularV1.1 _c5_flipbook
P. 26

Example: Organise a Birthday Party

                  Step 1  Make  a  list of family members and
                           friends to be invited.

                  Step 2  Decide the date, time and place for the
                           party.

                  Step 3  Inform family members and  friends
                           about the party place through phone
                           call or e-mail.

                  Step 4  Make necessary arrangements like seating, food and entertainment.

                  Step 5  Greet the guests with love and warmth.
                  Step 6  Start and enjoy the party.                Clickipedia

                  Step 7  Farewell to the guests.

                  In computer terms,  'Algorithm  is                 Ada Lovelace is credited
                  the sequence of steps or computer                  for  the evolution of the

                  operations that collectively solve a               concept of algorithm.
                  given problem'.
                  Writing an Algorithm

                  Let us learn how to write an algorithm.

                  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 number A.

                  Step 8  Print the difference.

                  Step 9  Stop.
                  Algorithm to find the smallest of two numbers A and B.


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

                  Step 3  Compare number A with B. If A is less than B, print "A is smallest" and go
                           to Step 5.


                  24      Modular (Ver. 1.1)-V
   21   22   23   24   25   26   27   28   29   30   31