Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
28
Task/Symmetric-difference/Pascal/symmetric-difference.pas
Normal file
28
Task/Symmetric-difference/Pascal/symmetric-difference.pas
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
PROGRAM Symmetric_difference;
|
||||
|
||||
TYPE
|
||||
TName = (Bob, Jim, John, Mary, Serena);
|
||||
TList = SET OF TName;
|
||||
|
||||
PROCEDURE Put(txt : String; ResSet : TList);
|
||||
VAR
|
||||
I : TName;
|
||||
|
||||
BEGIN
|
||||
Write(txt);
|
||||
FOR I IN ResSet DO Write(I,' ');
|
||||
WriteLn
|
||||
END;
|
||||
|
||||
VAR
|
||||
ListA : TList = [John, Bob, Mary, Serena];
|
||||
ListB : TList = [Jim, Mary, John, Bob];
|
||||
|
||||
BEGIN
|
||||
Put('ListA -> ', ListA);
|
||||
Put('ListB -> ', ListB);
|
||||
Put('ListA >< ListB -> ', ListA >< ListB);
|
||||
Put('ListA - ListB -> ', ListA - ListB);
|
||||
Put('ListB - ListA -> ', ListB - ListA);
|
||||
ReadLn;
|
||||
END.
|
||||
Loading…
Add table
Add a link
Reference in a new issue