Cody

Solution 720883

Submitted on 24 Aug 2015 by goc3
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 = 22; y_correct = 0; assert(isequal(prime(x),y_correct)) x = 22; y_correct = 0; assert(isequal(prime(x),y_correct)) x = 21; y_correct = 0; assert(isequal(prime(x),y_correct)) x = 5; y_correct = 1; assert(isequal(prime(x),y_correct)) x = 3; y_correct = 1; assert(isequal(prime(x),y_correct))

p = 2 3 5 7 11 13 17 19 ans = 0 p = 2 3 5 7 11 13 17 19 ans = 0 p = 2 3 5 7 11 13 17 19 ans = 0 p = 2 3 5 ans = 1 p = 2 3 ans = 1

Suggested Problems

More from this Author5