Five_NT

main.cpp

Mar 9th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. // L3v2.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "header.h"
  6. #include <iostream>
  7.  
  8. using namespace std;
  9.  
  10.  
  11. int main() {
  12.     Complex a(4); Complex b("8i");
  13.     Complex c(10); Complex d("12i");
  14.     //Complex e(20, "40i");
  15.     //e.print();
  16.  
  17.     Complex z1 = a.add(b);
  18.     Complex z2 = c.add(d);
  19.  
  20.     cout << "z1 = "; z1.print();
  21.     cout << "z2 ="; z2.print();
  22.    
  23.     cout << "\n* Adunare: ";
  24.     Complex adunare = z1.add(z2);
  25.     adunare.print();
  26.  
  27.     cout << "* Scadere: ";
  28.     Complex scadere = z1.minus(z2);
  29.     scadere.print();
  30.    
  31.     cout << "* Inmultire: ";
  32.     Complex inmultire = z1.mul(z2);
  33.     inmultire.print();
  34.    
  35.     cout << "* Impartire: ";
  36.     Complex impartire = z1.div(z2);
  37.     impartire.print();
  38.    
  39.     return 0;
  40. }
Add Comment
Please, Sign In to add comment