Editor

Swap Two Values

Rearrange the lines · Beginner · about 3 min

This program swaps the values of two variables, using a third variable to hold one value for a moment. Its lines are mixed up: put them back in an order that prints exactly the output below. Each line keeps its indentation, so you only choose the order.

Example

In the right order, the program prints:

Before: 10 25
After: 25 10

Your program

0 of 7 placed

Add the first line from the blocks.

Blocks

7 blocks still to place
The solution opens after your first Check.