Medot_Gurwiza (664010), страница 4
Текст из файла (страница 4)
form1.C_S.Cells[j,i]:=intToStr(C_B[i,j]);
end;
end;
label23.caption:='B';
tabliza.cells[1,0]:='b_малая';tabliza.cells[2,0]:='b_большая';
for j:=1 to n do
begin
tabliza.cells[1,j]:=intToStr(b_m[j]);
tabliza.cells[2,j]:=intToStr(b_b[j]);
end;
for i:=1 to n do
for j:=1 to k do
tabliza.cells[j+2,i]:=floatToStr(V_b[i,j]);
end;
end;
end.
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, StdCtrls, ExtCtrls, Buttons, Menus;
type
TForm2 = class(TForm)
alpfa: TStringGrid;
Panel1: TPanel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure FormShow(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
i,j:integer;
implementation
uses osnowa;
{$R *.DFM}
{ Ввод козффициентов оптимизмов}
procedure TForm2.FormShow(Sender: TObject);
begin
j:=0;
form1.tabliza.Visible:=true;
alpfa.Colcount:=strToInt(form1.edit3.text);
for i:=0 to alpfa.Colcount do
begin
j:=j+1;
alpfa.Cells[i,0]:='Alpha'+intToStr(i+1);
alpfa.Cells[i,1]:=FloatToStr(al[j]);
end;
end;
procedure TForm2.BitBtn2Click(Sender: TObject);
begin
j:=0;
for i:=0 to alpfa.Colcount do
begin
j:=j+1;
try
al[j]:=strToFloat(trim(alpfa.Cells[i,1]));
form1.tabliza.Cells[3+i,0]:=alpfa.Cells[i,1];
except
showMessage('Ошибочная запись числа : '+alpfa.Cells[i,1]);
end; end;
end;
end.
П
риложение 2 Результат работы программы















