public static void Main()
Console.WriteLine("How much are you investing? ($)");
double investmentInterest = 0;
if (!double.TryParse(Console.ReadLine(), out investment))
Console.WriteLine("Invalid input. Please try again.");
Console.WriteLine("At what rate are you investing at? (In %)");
if (!double.TryParse(Console.ReadLine(), out rate))
Console.WriteLine("Invalid input. Please try again.");
double interestRate = rate / 100;
Console.WriteLine("Year Interest Balance");
while (investment <= 1000000000)
investmentInterest = interestRate * investment;
investment += investmentInterest;
Console.WriteLine("{0}{1,25},{2,25}", year, investmentInterest.ToString("C2"), investment.ToString("C2"));