public DiffEvenOddSum(int no) { if (no < 0) { no = -no; } iNo = no; ae = new AdditionEven(iNo); ao = new AdditionOdd(iNo); }
static void Main(string[] args) { int iNo; Console.Write("Enter the Number : "); iNo = Convert.ToInt32(Console.ReadLine()); AdditionOdd AOdd = new AdditionOdd(iNo); AdditionEven AEven = new AdditionEven(iNo); AOdd.OddSum(); AOdd.display(); AEven.EvenSum(); AEven.display(); DiffEvenOddSum deos = new DiffEvenOddSum(iNo); deos.DiffSum(); deos.display(); }