Math.pow(5,2) 는 25이다.
=> 5^2

public class Money {
public static void main(String[] args) {
// 변수 생성
int a = 10000000;
double r = 0.03;
double n = 5;
// 계산
int s = (int)(a * Math.pow(1+r, n));
// 출력
System.out.printf("만기 금액: %d 원", s);
}
}
s = a * (1+r)^n는
s = a * Math.pow(1+r, n)로 바꿀 수 있다.