ebosetalee/20-days-challenge

3a - Combine two files

Closed this issue · 0 comments

Write a program to read two text files, line by line, concatenate each line for both files, and output the concatenated result to a third file.

Sample txt file (1)

if
you
let
and
go,
someone
will
be
smart
enough
to
catch
me
and
never
make
your
mistake

Sample txt file (2)

ever
do not
me
my friend
tonight,
, yes, someone
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
... mhmmm ...
ever again.

Sample Output

if ever
you do not
let me
and my friend
go, tonight,
someone, yes, someone
will ... mhmmm ...
be ... mhmmm ...
smart ... mhmmm ...
enough ... mhmmm ...
to ... mhmmm ...
catch ... mhmmm ...
me ... mhmmm ...
and ... mhmmm ...
never ... mhmmm ...
make ... mhmmm ...
your ... mhmmm ...
mistake ever again.