unit Tabelle0;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Grids, Buttons;
type
TForm1 = class (TForm)
StringGrid1: TStringGrid;
Button1: TButton;
BitBtn1: TBitBtn;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end ;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var i, j: Integer;
begin
StringGrid1.Cells[0,0] := 'Zahl';
StringGrid1.Cells[1,0] := 'Doppeltes';
StringGrid1.Cells[2,0] := 'Quadrat';
StringGrid1.Cells[3,0] := 'Wurzel';
StringGrid1.Cells[4,0] := 'Kubik';
StringGrid1.Cells[5,0] := 'Kehrwert';
for i := 1 to 10 do StringGrid1.Cells[0,i] := IntToStr(i);
for i := 1 to 10 do StringGrid1.Cells[1,i] := IntToStr(2*i);
for i := 1 to 10 do StringGrid1.Cells[2,i] := IntToStr(i*i);
for i := 1 to 10 do StringGrid1.Cells[3,i] := FloatToStrF(sqrt(i),ffGeneral,8,0);
for i := 1 to 10 do StringGrid1.Cells[4,i] := IntToStr(i*i*i);
for i := 1 to 10 do StringGrid1.Cells[5,i] := FloatToStrF(1/i,ffGeneral,8,0);
end;
end .