View difference between Paste ID: nJsA0SpE and GNVGfdr1
SHOW: | | - or go back to the newest paste.
1-
var a,b,c: integer;
1+
var cisla,hodnota,i, pocet:integer;
2
novy: string;
3-
a:= strtoint (edit1.Text);
3+
nasiel:boolean;
4-
b:= strtoint (edit2.Text);
4+
5-
c:= strtoint (edit3.Text);
5+
nasiel:= false;
6-
if (a>b) and (a>c) then memo1.Lines.add(inttostr(a) + ' the biggest');
6+
pocet:= strtoint (inputbox('zadaj','pocet cisel',''));
7-
if (b>c) and (b>a) then memo1.Lines.add(inttostr(b) + ' the biggest');
7+
hodnota:= strtoint (inputbox('zadaj','hodnotu',''));
8-
if (c>a) and (c>b) then memo1.Lines.add(inttostr(c) + ' the biggest');
8+
novy:= '';
9-
if (a=b) and (a=c) then memo1.Lines.add(inttostr(a) + ' vsetky su rovnake');
9+
for i:=1 to pocet do
10
begin
11-
11+
randomize;
12
cisla:= random (100)+1;
13
novy:= novy + ' ' + inttostr (cisla);
14
if cisla=hodnota then nasiel:=true;
15
end;
16
memo1.Lines.add (novy);
17
if nasiel
18
then memo1.Lines.add (inttostr (hodnota) + ' sa nachadza tam')
19
else
20
memo1.Lines.add (inttostr (hodnota) + ' sa nenachadza' );
21
end;
22
end.