Generation

generate functionFri, 09 Dec 2022

Calculate compound interest

double compoundInterest(double p, double r, double n, double t) { return p * (Math.pow((1 + r / n), n * t)); }

Questions about programming?Chat with your personal AI assistant