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)); }

Want to kickstart your project?Use the new AI Studio to create your code