Added template for c++ programs. Problem B works perfectly