Cody

Solution 1577308

Submitted on 6 Jul 2018 by Martin C.
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 = 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 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 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 Columns 31 through 41 127 131 137 139 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 = 2 3 5 7 11 13 17 19 y = 17 19

Suggested Problems

More from this Author18