Cody

Solution 1536200

Submitted on 22 May 2018 by J-G van der Toorn
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))

ans = 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120

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

ans = Columns 1 through 29 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 Columns 30 through 41 169 170 171 172 173 174 175 176 177 178 179 180

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

ans = 14 15 16 17 18 19 20

Suggested Problems

More from this Author18