using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class Cmplx {
public double re;
public double im;
public Cmplx(double re, double im) { this.re = re; this.im = im; }
public Cmplx() { this.re = this.im = 0; }
public static Cmplx operator+(Cmplx l, Cmplx r) {
Cmplx ret = new Cmplx();
ret.re = l.re + r.re;
ret.im = l.im + r.im;
return ret;
}
}
internal class Program
{
static void Main(string[] args)
{
Cmplx c1 = new Cmplx(3.0, 5.0);
Cmplx c2 = new Cmplx(1.0, 2.0);
Cmplx c3 = c1 + c2;
}
}
}