// Esempio di associativita` degli operatori #include #include using namespace std; int main() { int x, y, z; x = 5; y = 7; cout << "Inizio:" << endl; cout << "x = " << x << endl; cout << "y = " << y << endl; cout << "-------" << endl; z = x++ + y; cout << "z = x++ + y" << endl; cout << "x = " << x << endl; cout << "y = " << y << endl; cout << "z = " << z << endl; cout << "-------" << endl; z = ++x + y; cout << "z = ++x + y" << endl; cout << "x = " << x << endl; cout << "y = " << y << endl; cout << "z = " << z << endl; cout << "-------" << endl; x = y += z; cout << "x = y += z ==>:" << endl; cout << "x = " << x << endl; cout << "y = " << y << endl; cout << "z = " << z << endl; cout << "-------" << endl; return 0; }