1. Write a functions that is passed a double called presntValue, a double called annualInterest, and an integer called months as parameters. The function calculates the future value of presentValue if the amount is compounded monthly for the number of months in month. The formula is futureValue = presentValue(1+r/12.0)months.
The function returns the variable futureValue.
2. Write function that is passed two integers and double. The first integer is the the whole number of hours that you have been driving. The second integer is the number of minutes, between 0 and 59 inclusively, and the double is the number of miles. The functions will check that hours is at least one, that minutes are between 0 and 59, and then use those values to calculate the speed that you have been driving. The only printing that the function does is to print an error message if the error check fails. In that case the function should also exit the program. If all of the error checking passes the functions returns the double speed.