|
|
@ -22,14 +22,26 @@ public:
|
|
|
|
r = a;
|
|
|
|
r = a;
|
|
|
|
i = b;
|
|
|
|
i = b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cnumber(const fraction &a) {
|
|
|
|
|
|
|
|
r = a;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
cnumber(int a, int b) {
|
|
|
|
cnumber(int a, int b) {
|
|
|
|
r = a;
|
|
|
|
r = a;
|
|
|
|
i = b;
|
|
|
|
i = b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cnumber(int a) {
|
|
|
|
|
|
|
|
r = a;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
cnumber(double a, double b) {
|
|
|
|
cnumber(double a, double b) {
|
|
|
|
r = a;
|
|
|
|
r = a;
|
|
|
|
i = b;
|
|
|
|
i = b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
cnumber(double a) {
|
|
|
|
|
|
|
|
r = a;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
~cnumber() {}
|
|
|
|
~cnumber() {}
|
|
|
|
// Member functions
|
|
|
|
// Member functions
|
|
|
|
cnumber conjugate() const {
|
|
|
|
cnumber conjugate() const {
|
|
|
|