Example #1
0
        static void Main(string[] args)
        {
            Calculater calculater = new Calculater();

            Console.WriteLine(calculater.Add(12, 45, 78, 9));
            Console.WriteLine(calculater.Multiply(12, 45, 78, 8));
        }
Example #2
0
        public static void practice13_1()
        {
            Calculater calA = new Calculater();
            Calculater calB = new Calculater();

            int a = 20;
            int b = 10;

            double x = 20.5;
            double y = 10.5;

            Console.WriteLine("a={0}, b={1}", a, b);
            Console.WriteLine("사칙연산 결과: {0},{1},{2},{3}", calA.Add(a, b), calA.Substract(a, b), calA.Multiply(a, b), calA.Divide(a, b));
            Console.WriteLine();
            Console.WriteLine("x={0}, y={1}", x, y);
            Console.WriteLine("사칙연산 결과: {0},{1},{2},{3:N6}", calB.Add(x, y), calB.Substract(x, y), calB.Multiply(x, y), calB.Divide(x, y));
        }
Example #3
0
 public void MultiplyTest()
 {
     Assert.AreEqual(9, Calculater.Multiply(3, 3));
     Assert.AreEqual(3.30, Calculater.Multiply(1.10, 3));
 }
        public void ShouldMulitplyTwoNumbers()
        {
            var sut = new Calculater();

            Assert.That(sut.Multiply(5, 10), Is.EqualTo(50));
        }