Exemplo n.º 1
0
        static void Main(string[] args)
        {
            ComplexNumb ob1 = new ComplexNumb(3, 5);
            ComplexNumb ob2 = new ComplexNumb(5, 6);
            ComplexNumb ob3 = ob1 * ob2;

            Console.WriteLine(ob3.ToString());
            Console.ReadKey();
        }
Exemplo n.º 2
0
        public static ComplexNumb operator /(ComplexNumb A, ComplexNumb B)
        {
            ComplexNumb conjugate = new ComplexNumb(B.real, -B.imag);

            B *= conjugate;

            ComplexNumb numerator = A * conjugate;

            return(new ComplexNumb(
                       numerator.real / B.real,
                       numerator.imag / B.real));
        }