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 m_03.cpp
14*/
15
16
17// the rule: minimize or eliminate the globals
18// use locals
19
20
21#include <iostream>
22
23using namespace std;
24
25extern void f();
26
27int main(int argc, char* argv[]) {
28
29 int i = 8;
30 int a = 1;
31
32 cout << "m / ";
33 cout << ++i;
34 cout << endl;
35 cout << "a = ";
36 cout << ++a;
37 cout << endl;
38
39 cout << endl;
40
41 f();
42
43 cout << endl;
44
45 cout << "m / ";
46 cout << ++i;
47 cout << endl;
48 cout << "a = ";
49 cout << ++a;
50 cout << endl;
51
52 cout << endl;
53
54 f();
55
56 cout << endl;
57
58 cout << "m / ";
59 cout << ++i;
60 cout << endl;
61 cout << "a = ";
62 cout << ++a;
63 cout << endl;
64
65}