0

im having a little troubele with this problem. i am working on an intrest calculator and have hit a snag.its saying there is error with my Math.pow punction can someone help please. ill add what i have so far below

```
import java.util.Scanner;
public class Calculator {
public static void main (String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Input a Principal Amount:");
float P = input.nextInt();
System.out.print("Input the number of terms (in years):");
float t = input.nextFloat();
t = t*12;
System.out.print("Enter the number of times intrest is compounded per year:");
float n = input.nextFloat();
System.out.print("Input a Annual Intrest (in decimal form):" );
float r = input.nextFloat();
System.out.print("Enter the method to calculate the intrest 1 = Simple , 2 = Monthly Compounded 3 = Daily Compounded" );
int method = input.nextInt();
float A = 0;
double pwr = 0;
switch (method) {
case 1: A = (P * r * t);
case 2: A = (P *(1 + (r/n))Math.pow(n,t)-P);
case 3: A = (P *(1 + (r/n))Math.pow(n,t)-P);
default : System.out.print("An invalid option has been made");
}
System.out.print("total calculated intrest" + A);
System.out.print("Total amount to be repaid" + (A+P));
}
}
```