Advertisement
Nuno_de_Carvalho

Untitled

Nov 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. y:=0;
  2. for i := 2 to x-1 do
  3. begin
  4. if (x MOD i=0) then
  5. y:=y+1;
  6. end;
  7. if y> 0 then
  8. writeln(x,' não é primo');
  9. if y=0 then
  10. writeln(x,' é primo.');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement