clear;
close all
clc;
N = 10;
list=2:N;
values = [2];
list(find(mod(list,2)==0))=[];
tester = 3;
while list ~= []
list(find(mod(list,tester)==0))=[];
tester = list(1);
values = values + [, tester];
end
fromlistloopnotnumberprimewhileworking
Best Answer