Page 5 - PROGRAMMING IN C_Neat
P. 5

Flow Chart:

                                               Start


                                            Input   n



                                             fact = 1

                                                                 False

                                          for  i = 1 to n

                                                       True

                                          fact = fact * i

                                          Output  fact



                                               End
        _______________________________________________________________________________________________

        5. Write the algorithm and draw the flowchart to find the largest of three numbers. *

        Largest of Three Numbers:

        Algorithm:
                       Begin
                              Input   a, b, c
                              if (a > b) then
                                     if (a > c) then
                                            Output   a
                                     else
                                            Output   c
                              else
                                     if (b > c) then
                                            Output   b
                                     else
                                            Output   c
                       End
   1   2   3   4   5   6   7   8   9   10