Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var cislo,delitel: integer;
- begin
- cislo:= strtoint (edit1.Text);
- if (cislo<2) or ((cislo>2) and(cislo mod 2 = 0)) then label1.Caption:= 'nie je prvocislo'
- else
- begin
- delitel:=1;
- repeat
- delitel:= delitel +1;
- until cislo mod delitel=0;
- if delitel<cislo
- then label1.Caption:='nie je prvocislo'
- else label1.Caption:= 'je to prvocislo';
- end;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment