public static void Main()
Console.WriteLine("Billionaire");
Console.WriteLine(new String ('-', 50));
Console.WriteLine("How much would you like to invest? (Principle Investment)");
double Pvalue= Convert.ToDouble(Console.ReadLine());
Console.WriteLine("What is your investment rate?(Must be Positive and in %)");
double Rvalue= Convert.ToDouble(Console.ReadLine());
Console.WriteLine("Your Yearly Balance is : ");
Console.WriteLine(new String ('-',24));
Console.WriteLine("{0,-10} {1,60} {2,60}", "Year", "Interest", "Balance");
Console.WriteLine(new string ('-',133));
total = Pvalue* Math.Pow(1+Rvalue/100,year);
interest = Pvalue* Math.Pow(1+Rvalue/100,year) - Pvalue* Math.Pow(1+Rvalue/100,year-1) ;
Console.WriteLine("{0,-10} {1,60} {2,60:C2}", year, interest, total);
}while (total<=1000000000);
Console.WriteLine(new String ('-',133));
Console.WriteLine("It will take " + year + " years for you to become a billionaire");