#include <iostream>
using  namespace std;
class Complex
{
private:
	double real;
	double imag;
public:
	Complex();
	Complex(double r,double i);
	Complex operator + (Complex &t1); 	
	void display();  
};
int main()
{
	Complex t1(2,5);
	Complex t2(3,-1);
	Complex t3;
	t3=t1+t2;
	cout<<"t1+t2=";
	t3.display();
	return 0;
}
Complex::Complex()
{
	real=0;
	imag=0;
}
Complex::Complex(double r,double i)
{
	real=r;
	imag=i;
}
void Complex::display() 
{
	cout<<"("<<real<<","<<imag<<"i)"<<endl;    
}
Complex Complex::operator + (Complex &t1)        
{
	Complex t;                              
	t.real=real+t1.real;                    
	t.imag=imag+t1.imag;             
	return t;
}
