Update main.cpp

Through loops in control structures