procedure TForm1.Button1Click(Sender: TObject);
var
i,sayi,y:longint;
a:boolean;
begin
FORM1.Caption:='ASAL SAYILARIN BULUNMASI';
for sayi:=1 to 100 do begin
 i:=2;
  y:=trunc(sqrt(sayi));
   a:=true;
while (i<=y) and (a=true) do begin
 if sayi/i=sayi div i then
   a:=false
    else
     i:=i+1;
end;
if a<>false then begin
  listbox1.Items.Add(inttostr(sayi));
  end;
  end;
end;
end.