Page 46 - TP_iPlus_V2.1_Class8
P. 46

Example 3: Flowchart to making a cup of tea.        Example 4: Flowchart of calculating the area
                                                                      of a circle.
                                    Start
                                                                                            Start

                            Collect kettle, teabags,
                            water, milk, sugar, cup
                                                                                     Read Radius as r

                          Boil the water in the kettle


                      Pour the boiling water into the cup                            Area = 3.14 × r × r


                    Add milk, sugar and put a teabag in the cup
                                                                                        Print Area
                                 Stir the tea


                                Tea is ready                                                Stop


                                    Stop




                  Example  5:  Flowchart  to  finding  the  smaller   Example 6: Flowchart to displaying a series of
                  number between two numbers.                         numbers from 1 to 10.
                  There  comes  a situation where  we need to         A loop is a sequence of steps repeated  a

                  make a decision based on certain condition.         number  of times. We can  repeat  a group
                                                                      of  instructions  in  a  flowchart  until  a  specific
                                        Start
                                                                      condition is met.

                                    Read Num1,                                           Start
                                       Num2

                                                                                         A = 1
                                         Is
                            Yes                      No
                                   Num1<Num2?

                    Print "Num1                      Print "Num2                           Is
                                                                                                       No
                    is less than                     is less than                      A<=10?
                      Num2"                            Num1"
                                        Stop
                                                                                            Yes
                                                                                       Print A



                                                                                      A = A + 1          Stop







                    44
                         iPlus (Ver. 2.1)-VIII
   41   42   43   44   45   46   47   48   49   50   51