// demonstrates operation of incrment and decrement, suffix and prefix form // Mikhail Nesterenko // 9/7/2017 #include using std::cout; using std::endl; int main(){ int k; k=4; ++k; cout << "k = " << k << endl; k++; cout << "k = " << k << endl; int i; i = k++; cout << "i = " << i << " k = " << k << endl; int j; j = ++k; cout << "j = " << j << " k = " << k << endl; int m; m = k--; cout << "m = " << m << " k = " << k << endl; int n; n = --k; cout << "n = " << n << " k = " << k << endl; }