I'm trying to print a table showing the value of an account with simple interest added quarterly. This method also needs to ask the user to enter the original value of the account, the annual interest rate, and the number of years that should be calculated.
I keep getting an errors dealing with the scanner and the doubles and ints I use.
import java.util.*;
public class Tables {
public static final Scanner CONSOLE = new Scanner(System.in);
double v;
double p;
int y;
int q;
double r;
public static void main(String[] args) {
System.out.println("Lab 4 written by Leonardo Riojas");
promptString();
outputMethod();
}
public static void promptString() {
System.out.println("Enter orginial amount");
double p = CONSOLE.nextDouble();
System.out.println("Enter annual interest rate");
double r = CONSOLE.nextDouble();
System.out.println("Enter years");
double y = CONSOLE.nextDouble();
}
//dont know where to put this v
public static void outputMethod() {
for (int i = 1; i <= 4; i++)
v = p * (1 + (y - 1 + q / 4.0) * r / 100);
System.out.println(p + "\t");
}
}