Swapping two values

GCSE Paper 2: 2.2 Programming fundamentalsA Level Component 02: 2.2 Problem solving and programming