Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
function res = prime(a)
res = 1;
if isDevisable(a,2)
    res = 0;
    return;
end
for b = 1:2:ceil(sqrt(a)) 
    if isDevisable(a,(2*b+1))
        res = 0;
        break;
    end
end
end