Update main.cpp

For more user friendliness
1.avoid predefined input or static input
2.enter string as per user need i..e dynamic to reverse