added driver program to test the algorithm related to problem 7