#include<iostream>
using namespace std;
int f(int i)
{
return ++i;
}
int g( int& i)
{
return ++i;
}
int main()
{
int a, b, c, d, e, h;
a = b = c = d = e = h = 0;
a += f(a);
cout << "a: " << a << endl;
b = b + f(b);
cout << "b: " << b << endl;
c = f(c) + c;
cout << "c: " << c << endl;
d += g(d);
cout << "d: " << d << endl;
e = e + g(e);
cout << "e: " << e << endl;
h = g(h) + h;
cout << "h: " << h << endl;
int x = 0, y = 0, z = 0, q = 0;
x += f(g(x));
int s = g(y);
y += g(s);
int t = f(c);
z += g(t);
q += f(f(d));
cout << "x= " << x << " y= " << y << " z= " << z << " q= " << q << endl;
}