problem 1.8.cpp added. Implement a rfind() function