prusetli.pas

{ ppc386 -va -vh *.pas }
{ COMIENZO DE DESCRIPCION

  Programa de prueba para conjuntos representados
  mediante listas. keywords: conjunto, lista

FIN DE DESCRIPCION }
{-----+-----+-----+-----+-----+-----+-----+-----+-----+-----}
{ $Id: prusetli.pas v1.2 2002/04/04 17:40 mstorti Exp jdelia$}

program  prusetli;

uses u_setlis;

var
  C1, C2, C3 : setLis;
  a, i       : integer;

begin
   C1.ANULA;
   C2.ANULA;

   randomize;
   for a := 1 to 10 do begin
     i := random (20);
     C1.INSERTA (i);
     writeln (' ',i);
   end; {for}
   for a := 1 to 6 do begin
     C2.INSERTA (random (10));
   end;

   C1.IMPRIME ('C1 ');
   C2.IMPRIME ('C2 ');

   C3.INTERSECCION (C1, C2);
   C3.IMPRIME ('C1 interseccion C2 ');

   C3.UNION (C1, C2);
   C3.IMPRIME ('C1 union C2 ');

   C3.DIFERENCIA (C1, C2);
   C3.IMPRIME ('C1 menos C2 ');

end.
{-----+-----+-----+-----+-----+-----+-----+-----+-----+-----}

Generated by GNU enscript 1.6.1.