Problem 262. Swap the input arguments

Created by Steve Eddins

Write a two-input, two-output function that swaps its two input arguments. For example:

   [q,r] = swap(5,10)

returns q = 10 and r = 5.

Tags

Problem Group

403 solvers submitted 805 solutions (2.0 solutions/solver).

Problem Comments