-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomplex.h
More file actions
53 lines (41 loc) · 942 Bytes
/
complex.h
File metadata and controls
53 lines (41 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <cmath>
#include <string.h>
class Complex
{
private:
double real;
double imag;
double mod;
public:
Complex();
Complex printComplex(Complex *a, Complex *b);
Complex EnterComplex(Complex *a);
Complex EnterComplex(Complex *a, Complex *b);
Complex complexSum(Complex *a, Complex *b);
Complex complexSubstraction(Complex *a, Complex *b);
Complex complexMultiply(Complex *a, Complex *b);
Complex complexDivision(Complex *a, Complex *b);
double complexModulo(Complex *a);
double getreal()
{
}
void setReal(double real)
{
this->real = real;
}
double getImag()
{
}
void getImag(double imag)
{
this->imag = imag;
}
Complex(double real, double imag) : real(real), imag(imag) {}
Complex operator + (Complex *c1)
{
return Complex(this->real + c1->real, this->imag + c1->imag);
}
~Complex();
};
void print_error();
void print_menu(char select);