C++ test with if and else statements as well as ReadLine and WriteLine