View difference between Paste ID: JWJzMjQf and 4p5Ch4RJ
SHOW: | | - or go back to the newest paste.
1-
var
1+
var pocet,i,hladaj,cisla,novypocet:integer;
2-
vstup, novy:string;
2+
novy: string;
3-
i:integer;
3+
4
pocet:= strtoint (inputbox ('zadajte','pocet cisel',''));
5-
vstup:= (edit1.Text);
5+
hladaj:= strtoint (inputbox ('zadajte','ake cislo hladas',''));
6-
novy:='';
6+
novy:= '';
7-
for i:= 1 to length(vstup) do
7+
novypocet:= 0;
8-
8+
for i:= 1 to pocet do
9-
  if (vstup[i]>='0') and (vstup[i]<='9') or
9+
10-
  vstup[i]>='a') and (vstup[i]<='z') or
10+
  randomize;
11-
  vstup[i]>='A') and (vstup[i]<='Z') then
11+
  cisla:= random(100)+1;
12-
  novy:= novy + vstup[i];
12+
  novy:= novy + ' ' + inttostr(cisla);
13-
13+
  if hladaj=cisla then
14
  novypocet:= novypocet + 1;
15
end;
16-
16+
17-
end.
17+
memo1.Lines.Add(inttostr (hladaj) + ' sa nachadza tu ' + inttostr(novypocet));
18
end;