dont use this algorithm it doesnt work. im trying to fix it as of now. The square root sign doesnt work for some reason. Compound interest formula is below.