Skip to content
C

Apply Four Operations

Mediumjava

Start from a value, then apply four operations in order using compound assignment, printing the value after each step.

Input: the first line is the starting integer; then four lines, each an operator (+, -, * or /) and an integer, separated by a space. Division is integer division and the divisor is never zero.

Output: four lines — the value after each operation.

Input (stdin)

Output

Run your code to see output here...