Cody

Solution 1917442

Submitted on 31 Aug 2019 by Nikolaos Nikolaou
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
[x,y] = swap_vars(5,10); assert(isequal(x,10)); assert(isequal(y,5));

t1 = 5 t2 = 10 x = 10 y = 5

2   Pass
[x,y] = swap_vars('hello','bye'); assert(isequal(x,'bye')); assert(isequal(y,'hello'));

t1 = 'hello' t2 = 'bye' x = 'bye' y = 'hello'

3   Pass
[x,y] = swap_vars(5,'hello'); assert(isequal(x,'hello')); assert(isequal(y,5));

t1 = 5 t2 = 'hello' x = 'hello' y = 5