HERE IS MY CODE
double p; //amount of payment
double r;//APR is between 1.000% 10.000%
double apr;
double y;
double n; //number of periods
double v; //annuity value
double profit;
//Get quarterly payment
System.out.println("\t\t\tEnter Quarterly Payment Amount:");
Scanner keyboard = new Scanner(System.in);
p = keyboard.nextFloat();
//Get APR
System.out.println("Enter APR:");
apr = keyboard.nextFloat();
r = (apr * .01); //Multiply by hundreths
//Get Contract Length
System.out.println("Enter Contract length.");
y = keyboard.nextFloat();
n = y * 4;
//ECHO
System.out.println("Quarterly Payment:" + p);
System.out.println("APR:" + r);
System.out.println("Contract Length: " + y);
v = p * (Math.pow ( 1 + r , n ) - 1 ) / r ;
System.out.println("Annuity Value:
annuity should be 26,255.12 with an investment of $20,000 profit is $6,255