My hack code for problems and logic based questions in c++