/* Program to merge two sorted files */
open and read first line from each file
while (neither file has been exhausted)
{
determine which line comes next
print that line
get a fresh line from the corresponding file
}
empty the remaining active file, if any
close files
/* End of File */