03.09.2012, 15:35
|
Прохожий
|
|
Регистрация: 24.05.2012
Сообщения: 47
Репутация: 10
|
|
то есть все работать должно?, не охота тут просто весь код программы выкладывать. громозко больно
Код:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids;
type
TForm1 = class(TForm)
StringGrid1: TStringGrid;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
i,a,b,c,ir: Integer;
plus,minus,del,umn:string;
r: char;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
for b:=1 to StringGrid1.ColCount do
begin
for c:=1 to StringGrid1.RowCount do
begin
Randomize;
ir:=Random(3);
case ir of
1. r:='+';
2. r:='-';
3. r:='*';
4. r:='\';
end;
i:=Random(1000);
a:=Random(1000);
StringGrid1.Cells[b,c]:=IntToStr(i) + r + a;
end;
end;
end;
end.
|