Guest User

Untitled

a guest
May 22nd, 2012
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var pocet,i,hladaj,cisla,novypocet:integer;
  2. novy: string;
  3. begin
  4. pocet:= strtoint (inputbox ('zadajte','pocet cisel',''));
  5. hladaj:= strtoint (inputbox ('zadajte','ake cislo hladas',''));
  6. novy:= '';
  7. novypocet:= 0;
  8. for i:= 1 to pocet do
  9. begin
  10.   randomize;
  11.   cisla:= random(100)+1;
  12.   novy:= novy + ' ' + inttostr(cisla);
  13.   if hladaj=cisla then
  14.   novypocet:= novypocet + 1;
  15. end;
  16. memo1.lines.add (novy);
  17. memo1.Lines.Add(inttostr (hladaj) + ' sa nachadza tu ' + inttostr(novypocet));
  18. end;
Advertisement
Add Comment
Please, Sign In to add comment