Spent hours on this. Help please.

Have an assignment as follows:

Write a program that prompts the user for an initial investment amount and a goal investment amount and calculate how many years it will take to grow from the initial amount to the goal amount with a fixed interest rate (ie: 5 %). (use the for loop)

Prompt the user if they would like to run the program with other amounts or quit. (use the while loop). Output the initial amount, the goal amount and the number of years to reach that amount.

Cannot get it to work. Below is what I have. Any suggestions would be greatly appreciated.

import static java.lang.System.out;

import java.util.Scanner;

import java.io.*;

public class Project_5 {//main

public static void main(String[] args) {

double principle = 0;//initial amount investing

double interest = 0;

double rate = 0.05;//the fixed interest amount

double years = 0;//amout of years it will take to achieve goal

double goal = 0;//amount wanting to acquire goal:mad::mad:

Scanner myScanner = new Scanner(System.in);

System.out.println("****************************** ********* ");

System.out.println("* Welcome to the Investment Calculator * ");

System.out.println("****************************** ********* ");

System.out.println ("Enter your initial investment amount: if you want to exit enter 0.");

inputNumber = myScanner.nextInt();

principle = inputNumber;

if (inputNumber == 0){//if num = 0 exit class

System.exit(0);

}

System.out.println ("Enter your goal investment amount: ");

inputNumber2 = myScanner.nextInt ();

goal = InputNumber2;

System.out.println ("The fixed interest rate is 5%");

for (years = 0; years < goal; years++){

interest = principal * rate;

sum = sum + years;

{

System.out.print("The number of years you must invest after giving $ " + (goal);

System.out.println("is ") + (years) + (" years");

}

}

}

}