Prompt for two test files, each containing up to 100 lines of single strings with each string from 1 to 32 alphabetic
characters long with no leading, trailing, or embedded spaces. The contents of each file is a classical SET OF VALUES,
meaning that each line is one value in the set, there are no duplicate lines within a specific file, and the lines in the file
have no specific order. The problem is to compute four output sets:
The output data is to be written to set.out, with one left justified element per line with no leading or trailing blanks. In
all cases the order of the elements in the output file must be the same as in the original files, and where elements of
both A and B are present, all elements of A must be printed before the B elements. The output format should be:
BEGIN INTERSECTION
data lines
END INTERSECTION
BEGIN UNION
data lines
END UNION
BEGIN AMINUSB
data lines
END AMINUSB
BEGIN BMINUSA
data lines
END BMINUSA
where the data lines are indented five spaces.
Sample Input :
INPUT FILE 1
abababababababababababababababa
thisisalsoadataline
rdcuyikkjkjih
ababababababab
INPUT FILE 2
rdcuyikkjkjih
ababababababababa
poiyutyr
thisisalsoadataline
andthisisanother
Output File:
BEGIN INTERSECTION
thisisalsoadataline
rdcuyikkjkjih
END INTERSECTION
BEGIN UNION
abababababababababababababababa
thisisalsoadataline
rdcuyikkjkjih
ababababababab
ababababababababa
poiyutyr
andthisisanother
END UNION
BEGIN AMINUSB
abababababababababababababababa
ababababababab
END AMINUSB
BEGIN BMINUSA
ababababababababa
poiyutyr
andthisisanother
END BMINUSA