HOME

Write a program to Swap two variables

X and Y are variables that contain two values 35 and 47 respectively

Drag the following lines of code into order that will swap the values in these variables

If you are confused about what the variable 'temp' is for, think about what would happen if you wrote:

		X=Y
		Y=X
		

Both variables would be 47 at the end

Construct a pseudocode answer by drag&dropping and reordering lines from the left to the right.

Jumble the blocks! Try your code!