Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function primo(numero:integer):boolean;
- Var
- I, cont:Integer;
- Begin
- I := 0;
- cont := 1;
- while(I<3) and (numero <> cont)do
- begin
- If((numero mod cont)=0)Then
- I := I+1;
- cont := cont + 1;
- end;
- If(I=2)Then
- primo := true
- else
- primo := false;
- End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement