Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Complex.hpp"
- using namespace std;
- int main()
- {
- Complex a(1,2), b(1,-2), c(1,1), d;
- int x;
- cout<<"a = "<<a<<"b = "<<b<<"c ="<<c<<"d ="<<d;
- cout<<endl;
- cout<<"a + b = "<<a+b;
- cout<<"a - b = "<<a-b;
- cout<<"a * b = "<<a*b;
- cout<<"a / b = "<<a/b;
- cout<<10*a;
- cout<<a*10;
- a+=b+=c;
- if(!(c==a))cout<<"ok"<<endl;
- cout<<a;
- cout<<endl;
- cout<<"Czesc rzeczywista : "<<a.getReal()<<endl;
- cout<<"Czesc urojona : "<<a.getImag()<<endl;
- cout<<"Modul : "<<a.getModule()<<endl;
- cout<<"Faza : "<<a.getPhase()<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement