Исходники и листинги ::: Delphi ::: Таблица

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
  unit Unit1;
 
  interface
 
  uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls, Grids;
 
  type
    TForm1 = class(TForm)
      StringGrid2: TStringGrid;
      Edit1: TEdit;
      Edit2: TEdit;
      Label1: TLabel;
      Label2: TLabel;
      Button1: TButton;
      StringGrid1: TStringGrid;
      Button3: TButton;
      Button4: TButton;
     procedure Button3Click(Sender: TObject);
      procedure Button4Click(Sender: TObject);
      procedure Button1Click(Sender: TObject);
      procedure Edit1Change(Sender: TObject);
 
    private
      { Private declarations }
    public
      { Public declarations }
    end;
 
  var
    Form1: TForm1;
 
  implementation
 
  {$R *.dfm}
 
 
 
 
 
  procedure TForm1.Button3Click(Sender: TObject);
  begin
  form1.Close;
  end;
 
  procedure TForm1.Button4Click(Sender: TObject);
 
  var k:Integer;
  begin
  for k:=0 to strtoint(edit1.Text) do
  stringgrid1.Cells[0,k]:=inttostr(random(50)-10);
  end;
 
  procedure TForm1.Button1Click(Sender: TObject);
  var g,c,k:integer;
  begin
  c:=strtoint(edit2.Text);
  for k:=0 to strtoint(edit1.Text) do
  begin
  if stringgrid1.Cells[0,k]<>'' then
  begin
  g:=strtoint(stringgrid1.Cells[0,k]);
  g:=g*c;
  stringgrid2.Cells[0,k]:=inttostr(g);
  end
  else
  stringgrid1.Cells[0,k]:='ERROR';
  end;
  end;
 
  procedure TForm1.Edit1Change(Sender: TObject);
  var f:Integer;
  begin
  f:=strtoint(edit1.Text);
  stringgrid1.RowCount:=f;
  stringgrid2.RowCount:=f;
  end;
 
  end.
<<< Предыдущая работа

Вернуться в галерею исходников
Таблица
Автор: Buinov*
Город: Сургут
Дата: 18.01.2007  13:07
Комментариев: 0
Просмотров: 104
Оценка: 0 (0|0|0|0|0) [0]

Вернуться на главную
Авторский комментарий к работе: Програма умножает числа автоматически затолненые компьютером на введенное вами число.
Вы не можете оценивать

КОММЕНТАРИИ К РАБОТЕ:
Нет комментариев