Guest User

Untitled

a guest
Aug 1st, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.27 KB | None | 0 0
  1. function [y] =prim(a)
  2.     x=1:a^2/4
  3.     for i=2:a/2
  4.         for j=2:a/2
  5.             x(i*j)=0;
  6.         end
  7.     end
  8.     x(1)=0;
  9.     j=1;
  10.     for i=1:a
  11.         if(x(i)~=0) then
  12.             y(j)=x(i)
  13.             j=j+1;
  14.         end
  15.     end
  16.     j=j-1;
  17. endfunction
Add Comment
Please, Sign In to add comment