procedure TForm1 ButtonlClick Sender TObject var array -20 20 of real

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
procedure TForm1.ButtonlClick(Sender: TObject);
var
a:array [-20;20] of real;
b, c: integer;
begin
for b := -20 to 20 do begin
if abs(b) < 10 then
a[b] = sqrt(3*sqr(b) + 8);
end;
StringGtid1.Cells[1,0]:='x=';
StringGtid1.Cells[1,0]:='y=';
for b := -10 to 10 do begin
c:= b + 11;
StringGrid1.Cells[1,c]:=floattostr(b);
StringGrid1.Cells[1,c]:=floattostr(a[b]);
end;