public static void Main()
Console.WriteLine("\nEnter an initial investment amount");
if(Double.TryParse(Console.ReadLine(), out investment) && investment>0)
Console.WriteLine("Enter an annual rate of return");
if(Double.TryParse(Console.ReadLine(), out arr) && arr>0 && arr<1)
Console.WriteLine("Enter the number of years the money will be invested for (please enter an integer)");
if(int.TryParse(Console.ReadLine(), out years) && years>=1 && years<=100)
Console.WriteLine("\n"+a.PadRight(10) + "Year End Value");
for (int i=1;i <= years;i++)
investment = investment * (1+arr);
Console.WriteLine(" " + i + b.PadRight(10) + Math.Round(investment,2));
Console.WriteLine("Error: Please enter an integer between 1 to 100 as the number of years");
Console.WriteLine("Error: Please enter a decimal number between 0 to 1");
Console.WriteLine("Error: Please enter a positive number as the investment amount");