Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var pocet,i,hladaj,cisla,novypocet:integer;
- novy: string;
- begin
- pocet:= strtoint (inputbox ('zadajte','pocet cisel',''));
- hladaj:= strtoint (inputbox ('zadajte','ake cislo hladas',''));
- novy:= '';
- novypocet:= 0;
- for i:= 1 to pocet do
- begin
- randomize;
- cisla:= random(100)+1;
- novy:= novy + ' ' + inttostr(cisla);
- if hladaj=cisla then
- novypocet:= novypocet + 1;
- end;
- memo1.lines.add (novy);
- memo1.Lines.Add(inttostr (hladaj) + ' sa nachadza tu ' + inttostr(novypocet));
- end;
Advertisement
Add Comment
Please, Sign In to add comment