# Arup Guha
# 7/16/2013
# Solution to SI@UCF Homework: Math Class Practice Problem B

import math

def main():

    # Get input.
    principal = float(input("Enter the amount of money invested.\n"))
    rate = float(input("Enter the interest rate as a percentage.\n"))
    endtotal = float(input("How much money do you want to accrue total?\n"))

    # Solve for t in the equation e^(rt) = ($Final)/($Principal)
    # Just take the ln of both sides and divide by r.
    ratio = endtotal/principal
    time = math.log(ratio)/(rate/100)
    print("It will take you ",time," years to accrue $",endtotal,".",sep="")

main()  
