You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
715 B

#include <iostream>
#include "cnumber.hpp"
int main() {
5 years ago
cnumber a(3,2);
cnumber b(4,-3);
cout << "a = " << a << endl;
cout << "a* = " << a.conjugate() << endl;
5 years ago
cout << "a*a* = " << a * a.conjugate() << endl;
cout << "b = " << b << endl;
cout << "b* = " << b.conjugate() << endl;
5 years ago
cout << "b*b* = " << b * b.conjugate() << endl;
5 years ago
cout << "a + b = " << a + b << endl;
cout << "(a + b)* = " << (a + b).conjugate() << endl;
5 years ago
cout << "a - b = " << a - b << endl;
5 years ago
cout << "(a - b)* = " << (a - b).conjugate() << endl;
cout << "a * b = " << a * b << endl;
5 years ago
cout << "(a * b)* = " << (a * b).conjugate() << endl;
cout << "a / b = " << a / b << endl;
cout << "(a / b)* = " << (a / b).conjugate() << endl;
}