I need help with my java program

Status
Not open for further replies.

dragon8877

Estimable
Sep 29, 2015
1
0
4,510
0
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.
Thread starter Similar threads Forum Replies Date
aymen9309 Apps General Discussion 1
SyndiShanX Apps General Discussion 1
D Apps General Discussion 1
BlueMoon1890 Apps General Discussion 0
Neon The (Anthro) Umbreon Apps General Discussion 1
K Apps General Discussion 2
T Apps General Discussion 10
M Apps General Discussion 2
R Apps General Discussion 3
S Apps General Discussion 2
N Apps General Discussion 1
P Apps General Discussion 4
A Apps General Discussion 8
M Apps General Discussion 6
S Apps General Discussion 1
convaallaria Apps General Discussion 5
H Apps General Discussion 3
A Apps General Discussion 1
U Apps General Discussion 1
F Apps General Discussion 3

ASK THE COMMUNITY