I need help with my java program

Status
Not open for further replies.

dragon8877

Estimable
Sep 29, 2015
1
0
4,510
For some reason, java keeps telling me "Syntax error on token ""Please enter here the yearly payment"", delete this token." What should I do?
import java.util.*;
import java.text.*;
public class Lab3{
public static final Scanner CONSOLE=new Scanner(System.in);
public static void main(String[] args){
System.out.println("Lab3 written by xxxxxxxxxxxxxx");
//These are the abbreviated values, yay!
double PV;
double IR;
double NoY;
//Yall gonna have to enter yall's values
System.out.println("Enter the present value of your account");
PV=CONSOLE.nextDouble();
System.out.println("Please enter your interest rate");
IR=CONSOLE.nextDouble();
System.out.println("Please enter the number of years");
NoY=CONSOLE.nextDouble();
double CI3=(1+(IR/100));
double CI4=Math.pow(CI3, NoY);
System.out.println(PV*CI4);
}
//Now on to the future value of an Annuity
double YP;
double IR2;
double NoY2;
double FV;
System.out.println("Please enter here the yearly payment");
YP=CONSOLE.nextDouble;
System.out.println("Enter the interest rate");
IR2=CONSOLE.nextdouble;
System.out.println("Enter the number of years");
NoY2=CONSOLE.nextdouble;
FV2=(1+(IR2/100));
FV3=Math.pow(FV2, NoY2);
FV4=(FV3-1);
FV5=(FV4/(IR2/100));
System.out.println(FV5*YP);
}}

 
Status
Not open for further replies.