Use namespace std in main.cpp.
Change input loop in main(), it is now more logical.
Also check for extra characters after numbers input.