Page 53 - Computer Genius Class 07
P. 53

Example: Draw a flowchart to find profit or loss.
                  n  this   o chart   e  ha e  ta en  t o  inputs
                                                                       Flowchart: Profit and loss
                 namely cost price and selling price. Then, we will
                 calculate profit or loss depending on the  alues               Start
                 and prints the same.

                 l     Cost  price (C.P):  It  is  the  total amount  of   Read Cost price
                                                                                (C.P)
                   money that costs a manufacturer to produce a
                   given product or provide a given service.
                                                                              Read Selling
                 l    Selling price (S. P): It is the final price of a         price (S.P)
                   product. Selling price can also be referred to
                   as list price, market price, or standard price.
                                                                                            Yes
                 l    Profit (P): The profit is defined as the amount        Is S.P > C.P?          Profit= S.P– C.P
                   gained  by  selling  a  product, which  should  be
                   more than the cost price of the product.                         No
                                                                                                      Print Profit
                                  ro it   S.     .                          oss    .    S.
                                                                                    No
                 l   Loss (L): If a  product  is sold  at  a  price  less
                 than its cost price then the seller makes a loss.                                       End
                                                                              Print Loss
                                   oss    .    S.


                                                                                 End



                       Let's REFRESH


                    l   An algorithm is a set of steps in a sequential manner to solve a problem or to complete a task.
                    l   A  lo chart is a diagrammatic representation o  the step  y step plan to  e  ollo ed  or sol ing a
                      task/problem statement.
                    l   While drawing flowcharts we have to use standard symbols.
                    l   While drawing flowcharts we have to work in a consistent direction.

                    l   Disadvantage of flow chart is difficulty in modifications.





                                                       Exercise



                 A.  Multiple choice questions

                    1.  Which of the following is the way to represent an algorithm?
                        (i)   Flowchart                                      (ii)   Pseudocode

                       (iii)   Both (i) and (ii)                            (iv)   None of these



                                                                                       Coding and Flowchart    51
   48   49   50   51   52   53   54   55   56   57   58