Example #1
0
        public static void EnterEquation()
        {
            Console.WriteLine("Enter your equation:");
            string equation = Console.ReadLine();

            Console.WriteLine("The result of the equation is: " + CalculateService.CalculateRNP(equation));
            Console.WriteLine();
        }
Example #2
0
        public static void TestEquation()
        {
            Console.WriteLine("4+5*2");
            Console.WriteLine("The result of the equation is: " + CalculateService.CalculateRNP("4+5*2"));
            Console.WriteLine();

            Console.WriteLine("4+5/2");
            Console.WriteLine("The result of the equation is: " + CalculateService.CalculateRNP("4+5/2"));
            Console.WriteLine();

            Console.WriteLine("4+5/2-1");
            Console.WriteLine("The result of the equation is: " + CalculateService.CalculateRNP("4+5/2-1"));
            Console.WriteLine();
        }