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

double

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.