public static void Main() { Debt mortgage = new Debt(120000.0, 1.01); mortgage.PrintBalance(); mortgage.WaitOneYear(); mortgage.PrintBalance(); int years = 0; while (years < 20) { years += 1; mortgage.WaitOneYear(); } mortgage.PrintBalance(); Console.ReadLine(); }
public static void Main(string[] args) { Debt mortgage = new Debt(120000.0, 1.01); mortgage.PrintBalance(); mortgage.WaitOneYear(); int year = 0; while (year < 20) { mortgage.WaitOneYear(); year = year + 1; } mortgage.PrintBalance(); }
public static void Main(string[] args) { Debt mortgage = new Debt(120000.0, 1.01); mortgage.PrintBalance(); mortgage.WaitOneYear(); mortgage.PrintBalance(); // Wait 20 years int years = 0; while (years < 20) { mortgage.WaitOneYear(); years = years + 1; } mortgage.PrintBalance(); Console.ReadKey(); }