Page 90 - Code & Click - 5
P. 90

Step 4                             Step 5                             Step 6
              Get the cake packed properly.         Pay the bill for the cake.      Return home with the cake.

            Example 2: Write an algorithm to find the average of five numbers.


            Algorithm                                                    Working of algorithm
            Step 1: Get the five numbers.                                7, 11, 8, 12, 17

            Step 2: Add the numbers to get their sum.                    7 + 11 + 8 + 12 + 17 = 55
            Step 3: Divide the sum by 5.                                 55 ÷ 5 = 11

            Step 4: Display the result as average.                       11


            FLOWCHART

            A Flowchart is  a  pictorial or  diagrammatic  representation of
            an algorithm. It uses geometric symbols to represent various
            operations.  Each  symbol  is  used  for  a  specific  purpose  in  a

            flowchart.

                      Symbol                 Symbol Name                              Purpose

                                           Start/Stop Box or
             Oval                                                 Marks the beginning and end of a flowchart.
                                             Terminal Box

             Rectangle                        Process Box         Represents a process or action.


             Parallelogram                 Input/Output Box Obtains input and displays output.

                                                                  Tests  a  condition  and  takes  a  decision
             Diamond                          Decision Box        based on its result.


                                                                  Indicate the direction of operations in a
             Arrow Lines                       Flow Lines         flowchart.



             Circle                       On-page connector Connects parts of a flowchart within a page.

                                                                  Connects parts of a flowchart on different
             Polygon                      Off-page connector
                                                                  pages.


            88
   85   86   87   88   89   90   91   92   93   94   95