Page 92 - 2622_Delhi Police Public School_C-6
P. 92

Topic Flashback                                                 21 st  Century   #Critical Thinking
                                                                                            Skills
                                                                                                #Technology Literacy
                      Match the following:

                      1.  Start and Stop                              a.



                      2.  Decision                                    b.




                      3.  Input and Output                            c.



                      4.  Flow Line                                   d.




                      5.  Process                                     e.






               SOLVING PROBLEMS USING ALGORITHMS AND FLOWCHARTS

               Some examples are given below to solve the problems using algorithms and flowcharts:

               Example 1: Write an algorithm and draw a flowchart to check whether a given number is even
               or odd.
                              Algorithm:                                Flowchart:

               Step 1:  Start.
                                                                           Start
               Step 2:  Read Number.

               Step 3:  Check If Number % 2 == 0 Then
                                                                     Read a Number
                         print "Number is even."
                         Else
                                                                            Is
                         print "Number is odd."                                           Yes
                                                                     Number%2==0?             Print Number is even
               Step 4:  Stop.
                                                                              No


                                                                   Print Number is odd



                                                                           Stop











                 90     Premium Edition-VI
   87   88   89   90   91   92   93   94   95   96   97