static void Main(string[] args) { double principal = 200, rate = 25, time = 10, year = 6; int denom = 100, timec = 20; Maths maths = new Maths(); SimpleInterest simpleInterest = new SimpleInterest(maths); Console.WriteLine("Simple Interest Result : {0}", simpleInterest.SimpleInterestMethod(principal, rate, time, denom)); CompoundInterest compoundInterest = new CompoundInterest(maths); Console.WriteLine("Compound Interest Result : {0}", compoundInterest.CompoundInterestMethod(principal, rate, timec, year)); Console.ReadLine(); }
static void Main(string[] args) { int year, denominator; double princamt, rate; Console.Write("Enter The Loan Amount : "); princamt = Convert.ToDouble(Console.ReadLine()); Console.Write("Enter The Number of Years : "); year = Convert.ToInt16(Console.ReadLine()); Console.Write("Enter the Rate Of Interest : "); rate = Convert.ToDouble(Console.ReadLine()); Console.Write("Enter the Denominator value : "); denominator = Convert.ToInt32(Console.ReadLine()); SimpleInterest interestCalc = new SimpleInterest(); Console.WriteLine("Total Amount : {0}", interestCalc.calculateInterest(princamt, year, rate, denominator)); Console.ReadLine(); }