Пример #1
0
        static void printValues(simpleInterest objInterest)
        {
            objInterest.interest  = objInterest.principleAmt * objInterest.year * objInterest.rate / 100;
            objInterest.total_Amt = objInterest.principleAmt + objInterest.interest;

            Console.WriteLine("Total Ammount = " + objInterest.interest);
            Console.WriteLine("Total Ammount = " + objInterest.total_Amt);
        }
Пример #2
0
        static void getValue()
        {
            simpleInterest objInterest = new simpleInterest();

            Console.WriteLine("Enter the Loan Ammount");
            objInterest.principleAmt = Convert.ToDouble(Console.ReadLine());

            Console.WriteLine("Enter the Year");
            objInterest.year = Convert.ToInt32(Console.ReadLine());

            Console.WriteLine("Enter the rate of Interest");
            objInterest.rate = Convert.ToDouble(Console.ReadLine());
            printValues(objInterest);
        }