this slowpoke moves

Fill StringGrid Cells with loop

uses Grids

//

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; 

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate