Yurttas/PL/OOL/Cplusplus/F/03/02/04/00/01/complex 00.cpp
Jump to navigation
Jump to search
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 Complex d(c);
42
43 cout << "d /" << endl;
44 cout << d << endl;
45
46}