Skip to content
CampusEduX

Apply Four Operations

Mediumjava
Learn the Concept: Assignment Operators

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.

Related Problems

Input (stdin)

Output

Run your code to see output here...