M
Michael B. Williams
import java.math.*;
public class post
{
public static void main(String[] args)
{
int
term = 30,
amount = 200000,
principal = amount;
double
interest = .0575,
monthly_payment = 0,
J = 0,
N = 0,
ftemp;
J = interest / (1200);
N = 30*12;
ftemp = ( 1-(1+J) );
N = N * (-1);
System.out.println( ftemp );
// ftemp = -4.791666666670302E-5
System.out.println( N );
// N = -360.0
System.out.println( Math.pow( ftemp , N ) );
// the output is Infinity I tried hardcoding it to -360
}
}
public class post
{
public static void main(String[] args)
{
int
term = 30,
amount = 200000,
principal = amount;
double
interest = .0575,
monthly_payment = 0,
J = 0,
N = 0,
ftemp;
J = interest / (1200);
N = 30*12;
ftemp = ( 1-(1+J) );
N = N * (-1);
System.out.println( ftemp );
// ftemp = -4.791666666670302E-5
System.out.println( N );
// N = -360.0
System.out.println( Math.pow( ftemp , N ) );
// the output is Infinity I tried hardcoding it to -360
}
}