コード例 #1
0
        public void ModuloTest()
        {
            Modulofunction f        = new Modulofunction();
            int            answer   = f.Modulo(7, 2);
            int            expected = 1;

            Assert.AreEqual(answer, expected);
        }
コード例 #2
0
        public string Get([FromQuery(Name = "x")] int x, [FromQuery(Name = "y")] int y)
        {
            Modulofunction m      = new Modulofunction();
            int            answer = m.Modulo(x, y);

            var j = JsonConvert.SerializeObject(new
            {
                error  = "false",
                String = "",
                answer = answer
            });


            return(j.ToLower());
        }