// Increment Decrement

#include<iostream>
using namespace std;

int main()
{
    int x = 6;

    cout << "x = " << x << endl;

    // Incrementing x by 1

    x = x + 1;  // x equals 7 now
    cout << "x = " << x << endl;

    // Decrementing x by 2

    x = x - 2;  // x equals 5 now
    cout << "x = " << x << endl;

	// Again incrementing x by 1
	// But using compound assignment operator '+='

	x += 1;  // x equals 6 now
    cout << "x = " << x << endl;

    // Decrementing x by 1
	// Using compound assignment operator '-='

	x -= 1;  // x equals 5 now
    cout << "x = " << x << endl;

    // Incrementing x by 1 for last time
	// Using postfix operator '++'

	x++;  // x equals 6 now
    cout << "x = " << x << endl;

    return 0;
}
