Answer:
Output:
Post increment/decrement: 12
Pre increment/decrement: 10
Explanation:
In the above code that is written in the Java Programming Language.
- Set three integer variables and assign value in it "value1" to 3, "value2" to 3, "result" to 0.
- Increment in the variable "value1" by 1 i.e., 4 and multiply by decrement in the variable "value2" by 1 i.e., 3 and store their multiplication in the variable "result" i.e., 12.
- Print the value of the variable "result" with message.
- Again increment in the variable "value1" by 1 i.e., 5 and multiply by decrement in the variable "value2" by 1 i.e., 2 and store their multiplication in the variable "result" i.e., 10.
- Again print the value of the variable "result" with message.