1/*
2 Copyright(C) 1998
3 All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
4
5 Permission to use, copy, modify, and distribute this
6 software and its documentation for EDUCATIONAL purposes
7 and without fee is hereby granted provided that this
8 copyright notice appears in all copies.
9
10 date : January 1, 1998.
11 authorĀ : Salih Yurttas.
12
13 complex_00.cpp
14*/
15
16
17#include <iostream>
18
19using namespace std;
20
21#include "complex.h"
22
23int main(int argc, char* argv[]) {
24
25 complex a(1.0,-0.5),
26 b(0.0,1.0);
27
28 cout << "a /" << endl;
29 cout << a << endl;
30
31 cout << "b /" << endl;
32 cout << b << endl;
33
34 complex c;
35
36 c = a + b;
37
38 cout << "c /" << endl;
39 cout << c << endl;
40
41 cout << "a /" << endl;
42 cout << a << endl;
43
44 cout << "b /" << endl;
45 cout << b << endl;
46
47 complex d(c);
48
49 cout << "d /" << endl;
50 cout << d << endl;
51
52 cout << "c /" << endl;
53 cout << c << endl;
54
55 c += b;
56
57 cout << "c /" << endl;
58 cout << c << endl;
59
60 cout << "b /" << endl;
61 cout << b << endl;
62
63}