Exemplo n.º 1
0
        public void FindLcm()
        {
            LcmFinder f=new LcmFinder();

            string a = "11/12";
            string b = "13/5";

            Assert.AreEqual(60,f.Execute(a,b));
        }
        public ActionResult LcmResult(Fractions fractions)
        {
            if (ModelState.IsValid)
            {
                var f = new LcmFinder();
                fractions.CommonDenom = f.Execute(fractions.Input1, fractions.Input2);
            }
            else
            {
                return View("LcmRequest", fractions);
            }
            
            
            return View(fractions);

        }