Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 79 - 2617_JSSPS_C-6
P. 79

    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

                                                                                              Algorithmic Intelligence  77

| 74 75 76 77 78 79 80 81 82 83 84 |