#include<bits/stdc++.h>
using namespace std;
class Complex
{
public :
Complex(int a,int b,int c)
{
real=a;
image=b;
i=c;
}
void set1()
{
cin>>real>>image;
}
void set2()
{
cin>>i;
}
friend Complex operator +(Complex &c2);
void display()
{
if(image>0)
{
cout<<real<<"+"<<image<<endl;
}
else
{
cout<<real<<image;
}
real=i+real;
if(image>0)
{
cout<<real<<"+"<<image<<endl;
}
else
{
cout<<real<<image;
}
}
Complex operator+(Complex &c2)
{
Complex c;
c.real=real+c2.real;
c.image=image+c2.image;
return c;
}
private:
int real,image,i;
};
int main()
{
Complex c1;
c1.set1();
c1.set2();
c1.display();
return 0;
}
using namespace std;
class Complex
{
public :
Complex(int a,int b,int c)
{
real=a;
image=b;
i=c;
}
void set1()
{
cin>>real>>image;
}
void set2()
{
cin>>i;
}
friend Complex operator +(Complex &c2);
void display()
{
if(image>0)
{
cout<<real<<"+"<<image<<endl;
}
else
{
cout<<real<<image;
}
real=i+real;
if(image>0)
{
cout<<real<<"+"<<image<<endl;
}
else
{
cout<<real<<image;
}
}
Complex operator+(Complex &c2)
{
Complex c;
c.real=real+c2.real;
c.image=image+c2.image;
return c;
}
private:
int real,image,i;
};
int main()
{
Complex c1;
c1.set1();
c1.set2();
c1.display();
return 0;
}