Page 66 - MATINF Nr. 1
P. 66

66                                                                                R.M. Georgescu



            Round := proc (x, n) -> parse(sprintf("%.*f", n, x));
            u := FindAngle(d||i||j, d||k||l);
            a := 180*convert(u, float, 6)/(3.1415926535);                                                (3)
            b := Round(a, 4); c := trunc(b); d := trunc(60*(b-c));
            e := Round(3600*(b-c-(1/60)*d), 0)

            unde c reprezint˘a gradele, d minutele, iar e secundele corespunz˘atoare m˘asurii unghiului u dintre
            dreptele d ij s , i d kl .

                Pentru determinarea s , i afis , area perechilor de drepte paralele folosim secvent , a

              print(Dreptele paralele sunt):
               for i to n-1 do
                for j from i+1 to n do
                 for k from i to n-1 do
                  for l from k+1 to n do
                    if (i <> k or j < l) then
                     if AreParallel(d||i||j, d||k||l) then                                               (4)
                       print(d||i||j si d||k||l)
                     end if
                    end if
                  end do
                 end do
                end do
               end do;


                Pentru determinarea s , i afis , area perechilor de drepte confundate folosim secvent , a

            print(Dreptele confundate sunt):
            for i to n-1 do
              for j from i+1 to n do
               for k from i to n-1 do
                for l from k+1 to n do
                 if (i <> k or j < l) then
                  if (AreCollinear(P||i, P||j, P||k) and
                       AreCollinear(P||i, P||j, P||l)) then                                              (5)
                    print(d||i||j si d||k||l)
                  end if
                 end if
                end do
               end do
              end do
            end do


                Pentru determinarea s , i afis , area perechilor de drepte perpendiculare folosim secvent , a

            print(Dreptele perpendiculare sunt):
            for i to n-1 do
              for j from i+1 to n do
               for k from i to n-1 do
                for l from k+1 to n do
                 if (i <> k or j < l) then
                  if ArePerpendicular(d||i||j, d||k||l) then                                           (6)
                    print(d||i||j si d||k||l)
                  end if
   61   62   63   64   65   66   67   68   69   70   71