Пример #1
0
            public void InputFromFile(string pathToFile)
            {
                string data = File.ReadAllText(pathToFile);

                this.ParseComplex(data);
                MyComplexBase newComplex = new MyComplexBase(this["realValue"], this["imageValue"]);

                this.mySetFuncOutput("Варіант 7", newComplex);
            }
Пример #2
0
            public void InputFromTerminal()
            {
                Console.WriteLine("Enter complex number in algebraic notation: ");
                string complexStuff = Console.ReadLine();

                this.ParseComplex(complexStuff);
                MyComplexBase newComplex = new MyComplexBase(this["realValue"], this["imaginaryValue"]);

                this.mySetFuncOutput("Варіант 7", newComplex);
            }
Пример #3
0
 public void SpecialFunction2(string message, MyComplexBase myObj)
 {
     Console.WriteLine($"2. {message}: {myObj.real} + {myObj.imaginary}*i");
 }