Update main.cpp

Alg1, 2, and 3 now return results. These results are stored, sorted, and printed. Currently getting an error.