create functions to solve a set of three problems.