PROGRAMMING:Operation of complex number class
According to the following code segment to improve the?? In order to achieve the specified output.
```
class Complex
{
public:
Complex(double r=0, double i=0):real(r), imag(i){ }
Complex operator+( ?? ) const;// Overload binocular operator '+'
Complex operator-=( ?? ); // Overloaded binocular operator '- ='
friend Complex operator-( ?? ) const;// Overload binocular operator '-'
void Display() const;
private:
double real;
double imag;
};
void Complex::Display() const
{
cout << "(" << real << ", " << imag << ")" << endl;
}
int main()
{
double r, m;
cin >> r >> m;
Complex c1(r, m);
cin >> r >> m;
Complex c2(r, m);
Complex c3 = c1+c2;
c3.Display();
c3 = c1-c2;
c3.Display();
c3 -= c1;
c3.Display();
return 0;
}
```
###Input format:
The input has two lines, the real part and the imaginary part of two complex numbers.
###Output format:
Output results in sample format.
###Input example:
Here is a set of inputs. For example:
```in
4 2
3 -5
```
###Output example:
The corresponding output is given here. For example:
```out
(7, -3)
(1, 7)
(-3, 5)
```
answer:If there is no answer, please comment
```
class Complex
{
public:
Complex(double r=0, double i=0):real(r), imag(i){ }
Complex operator+( ?? ) const;// Overload binocular operator '+'
Complex operator-=( ?? ); // Overloaded binocular operator '- ='
friend Complex operator-( ?? ) const;// Overload binocular operator '-'
void Display() const;
private:
double real;
double imag;
};
void Complex::Display() const
{
cout << "(" << real << ", " << imag << ")" << endl;
}
int main()
{
double r, m;
cin >> r >> m;
Complex c1(r, m);
cin >> r >> m;
Complex c2(r, m);
Complex c3 = c1+c2;
c3.Display();
c3 = c1-c2;
c3.Display();
c3 -= c1;
c3.Display();
return 0;
}
```
###Input format:
The input has two lines, the real part and the imaginary part of two complex numbers.
###Output format:
Output results in sample format.
###Input example:
Here is a set of inputs. For example:
```in
4 2
3 -5
```
###Output example:
The corresponding output is given here. For example:
```out
(7, -3)
(1, 7)
(-3, 5)
```
answer:If there is no answer, please comment