This code demonstrates the following three algorithms.
Given the following, compute the total cost for two cars and find the cheapest.
- annual fuel consumed = annual miles driven / fuel efficiency
- annual fuel cost = price per gallon * annual fuel consumed
- operating cost = 10 * annual fuel cost
- total cost = purchase price + operating cost
Algorithmically compute how many years it will take to double any given amount of money with any given annual interest percentage.
Under a plan that costs $29.95 per month for 300 minutes of calls, plus $0.45 for every minute over 300, plus 12.5% in taxes and interest fees, calculate the phone bill for a month having used any given number of minutes.