Cody

Solution 1983115

Submitted on 20 Oct 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
a=100; b=120; y_correct = [101 103 107 109 113]; assert(isequal(allprimes(a,b),y_correct))

y = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 101 103 107 109 113 y = 101 103 107 109 113

2   Pass
a=140; b=180; y_correct = [149 151 157 163 167 173 179]; assert(isequal(allprimes(a,b),y_correct))

y = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 31 through 41 0 0 0 0 149 151 157 163 167 173 179 y = 149 151 157 163 167 173 179

3   Pass
a=14; b=20; y_correct = [17 19]; assert(isequal(allprimes(a,b),y_correct))

y = 0 0 0 0 0 0 17 19 y = 17 19

Suggested Problems

More from this Author18