Beginners... According to the definition of the complex number and four operations, the preparation of the complex class 1. Complex number in Mathematics (1) Definition of plural For example, if the discriminant is less than 0, the quadratic equation with one variable still has no solution, so the number set is expanded again to reach the complex range Definition: a number in the form of Z = a + bi is called complex number, where I is an imaginary unit, and I ^ 2 = I * I = - 1 (a, B are any real numbers) We call the real number a in the complex z = a + bi the real part of the imaginary Z, and record it as rez = a The real number B is called the imaginary part of the imaginary number Z, denoted as IMZ = B It is easy to know: when B = 0, z = a, then the complex number becomes a real number; When a = 0 and B ≠ 0, z = Bi, we call it pure imaginary number The set of complex numbers is represented by C. obviously, R is the proper subset of C The complex set is an unordered set, and the size order cannot be established (2) Four algorithms of complex numbers: If Z1 = a + bi, Z2 = C + Di, where a, B, C, D ∈ R, then   z1±z2=(a+bi)±(c+di)=(a±c)+(b±d)i,   (a+bi)•(c+di)=(ac-bd)+(bc+ad)i, (a+bi)÷(c+di)=(ac+bd)/(c^2+d^2) +((bc-ad)/(c^2+d^2))i According to the number of certain and four operations, write the complex class 2、 Requirements and purpose of the experiment 1. Understanding data type definition 2. Write code to realize data class

Beginners... According to the definition of the complex number and four operations, the preparation of the complex class 1. Complex number in Mathematics (1) Definition of plural For example, if the discriminant is less than 0, the quadratic equation with one variable still has no solution, so the number set is expanded again to reach the complex range Definition: a number in the form of Z = a + bi is called complex number, where I is an imaginary unit, and I ^ 2 = I * I = - 1 (a, B are any real numbers) We call the real number a in the complex z = a + bi the real part of the imaginary Z, and record it as rez = a The real number B is called the imaginary part of the imaginary number Z, denoted as IMZ = B It is easy to know: when B = 0, z = a, then the complex number becomes a real number; When a = 0 and B ≠ 0, z = Bi, we call it pure imaginary number The set of complex numbers is represented by C. obviously, R is the proper subset of C The complex set is an unordered set, and the size order cannot be established (2) Four algorithms of complex numbers: If Z1 = a + bi, Z2 = C + Di, where a, B, C, D ∈ R, then   z1±z2=(a+bi)±(c+di)=(a±c)+(b±d)i,   (a+bi)•(c+di)=(ac-bd)+(bc+ad)i, (a+bi)÷(c+di)=(ac+bd)/(c^2+d^2) +((bc-ad)/(c^2+d^2))i According to the number of certain and four operations, write the complex class 2、 Requirements and purpose of the experiment 1. Understanding data type definition 2. Write code to realize data class

#include
using namespace std;
Class plural{
private:
\X05double real part, imaginary part;
public:
\X05 complex (double x = 0, double y = 0) {real part = x; imaginary part = y;}
Plural operator +;
\X05friend plural operator - (plural, plural);
\x05friend ostream& operator