double CurrMoney=5000,TotalMoney; int years = 5; TotalMoney=CurrMoney * (1+(java.lang.Math.pow((0.05),years)));