Mega Code Archive

 
Categories / C# / Data Types
 

Divide and multiply

using System; using System.Numerics; public class Example {    public static void Main()    {       Complex c1 = new Complex(Double.MaxValue / 2, Double.MaxValue /2);       Complex c2 = c1 / Complex.Zero;       Console.WriteLine(c2.ToString());       c2 = c2 * new Complex(1.5, 1.5);       Console.WriteLine(c2.ToString());       Console.WriteLine();       Complex c3 = c1 * new Complex(2.5, 3.5);       Console.WriteLine(c3.ToString());       c3 = c3 + new Complex(Double.MinValue / 2, Double.MaxValue / 2);        Console.WriteLine(c3);    } }