Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // L3v2.cpp : Defines the entry point for the console application.
- //
- #include "stdafx.h"
- #include "header.h"
- #include <iostream>
- using namespace std;
- int main() {
- Complex a(4); Complex b("8i");
- Complex c(10); Complex d("12i");
- //Complex e(20, "40i");
- //e.print();
- Complex z1 = a.add(b);
- Complex z2 = c.add(d);
- cout << "z1 = "; z1.print();
- cout << "z2 ="; z2.print();
- cout << "\n* Adunare: ";
- Complex adunare = z1.add(z2);
- adunare.print();
- cout << "* Scadere: ";
- Complex scadere = z1.minus(z2);
- scadere.print();
- cout << "* Inmultire: ";
- Complex inmultire = z1.mul(z2);
- inmultire.print();
- cout << "* Impartire: ";
- Complex impartire = z1.div(z2);
- impartire.print();
- return 0;
- }
Add Comment
Please, Sign In to add comment