Welcome to the CSC Q&A.
Get help and give help!
Write great code!
It is our choices... that show what we truly are, far more than our abilities.


+20 votes
asked in CSC211_Winter2018 by (8 points)

1 Answer

+15 votes

Assuming that A is of type double and r and n are of type int...

double A = P*Math.pow((1+((r*1.0)/(n*1.0)), n*t);

There are other ways to do this, but that should do the trick.

answered by (8 points)