Update main.cpp

Replaced code in main.cpp to correctly show the output