Write a C++ program that takes an initial integer value x as input and performs the following operations:
Increment
xby 1 using the postfix increment operator.Decrement
xby 1 using the postfix decrement operator.Use the resulting value of
xto calculate the square ofxand store it in a variablex_squared.Print the original value of
x, the value ofxafter increment and decrement, and the calculatedx_squared.