Cody

Solution 561592

Submitted on 21 Jan 2015 by Pritesh Shah
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
%% a = [45 15 200 300]; arraygcdok=5; assert(isequal(arraygcd(a),arraygcdok))

x = 3 5 x = 5 x = 5

2   Pass
%% a = [140 7 14 35 42]; arraygcdok=7; assert(isequal(arraygcd(a),arraygcdok))

x = 7 x = 7 x = 7 x = 7

3   Pass
%% a = [100 90 70 2000]; arraygcdok=10; assert(isequal(arraygcd(a),arraygcdok))

x = 2 5 x = 2 5 x = 2 5

Suggested Problems

More from this Author100