Программный продукт, осуществляющий решение задач по дисциплине "Численные методы"
Курсовой проект - Компьютеры, программирование
Другие курсовые по предмету Компьютеры, программирование
rm1.N30Click(Sender: TObject);(Form1.Handle,HELP.hlp,HELP_CONTEXT,1);;.
Unit1_1; // Метод Гаусса (модуль 1)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);:= TRegistry.Create;.OpenKey(software,true);.OpenKey(stalk,true);Registry.ValueExists(polic) then // программа зарегистрирована.Enabled:=false;;;TForm1.WMGetSysCommand(var Message : TMessage);(Message.wParam = SC_Close) then.Close;.Close;
Inherited;;;TForm1.Timer2Timer(Sender: TObject);.Caption:=Datetostr(now)+г;.Caption:=Timetostr(now);;TForm1.N30Click(Sender: TObject);(Form1.Handle,HELP.hlp,HELP_CONTEXT,1);;.
Unit1_1; // Метод Гаусса (модуль 1)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls;
TForm2 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Edit1KeyPress(Sender: TObject; var Key: Char);
procedure Edit2KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
Form2: TForm2;
a,b:integer;Unit1_2;
15)or(a15)or(a<1) then
messagedlg(Количество уравнений не должно превышать 15.,mtinformation,[mbok],0);
end(b>15)or(b<1) then
messagedlg(Количество коэффициентов в уравнении не должно превышать 15.,mtinformation,[mbok],0);
enda<>b then
messagedlg(Количество коэффициентов в уравнении должно совпадать с количеством уравнений.,mtinformation,[mbok],0);
end.stringgrid1.colcount:=b+1;.stringgrid1.rowcount:=a+1;.StringGrid1.Height:=(a+1)*30;.StringGrid1.Width:=(b+1)*83;.Width:=form3.StringGrid1.Width+100;.Height:=form3.StringGrid1.Height+150;.Button1.Top:=form3.Height-90;.Button1.Left:=9;.Button2.Top:=form3.Height-90;.Button2.Left:=165;i:=0 to b-1 do.StringGrid1.Cells[i,0]:=X+inttostr(i+1);;.StringGrid1.Cells[b,0]:=Своб. чл.;i:=1 to a do.StringGrid1.Rows[i].Clear;;.Showmodal;;;;(Введите данные!,mtinformation,[mbok],0);;;TForm2.Button1Click(Sender: TObject);.Close;;TForm2.Edit1KeyPress(Sender: TObject; var Key: Char);key of
#8,0..9:;
#13:edit2.SetFocus;:=chr(0);;;TForm2.Edit2KeyPress(Sender: TObject; var Key: Char);key of
#8,0..9:;
#13:button2.SetFocus;:=chr(0);;;.
Unit1_2; //Метод Гаусса (Модуль 2)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids;
TForm3 = class(TForm)
Label1: TLabel;
StringGrid1: TStringGrid;
Button1: TButton;
Button2: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure StringGrid1KeyPress(Sender: TObject; var Key: Char);
private
{ Private declarations }
public
{ Public declarations }
end;
Form3: TForm3;
otvet:array [0..25] of real;
f:integer;Unit1_1, Unit1_3;
a;:=st-1;:=1;i:=stdownto1do[p]:=masst[i,ind];:=p+1;;:=2;:=b;i:=a-1downto1do">{$R *.dfm}TForm3.Button2Click(Sender: TObject);.close;.Close;;TForm3.Button1Click(Sender: TObject);,j,c,e,d,ind,st,p:integer;:array [0..25,0..25] of real;:array [0..25,0..25] of real;.Label1.Caption:=;i:=1 to a doj:=1 to b+1 do[i,j]:=strtofloat(form3.stringgrid1.Cells[j-1,i]);;;:=1;:=1;i:=st to b+1 do[st,i]:=maskof[st,i]/maskof[st,ind];;i:=st+1 to a doj:=st+1 to b+1 do[i,j]:=maskof[i,j]-maskof[i,st]*masst[st,j];;;:=st+1;:=ind+1;ind>a;:=st-1;:=1;i:=st downto 1 do[p]:=masst[i,ind];:=p+1;;:=2;:=b;i:=a-1 downto 1 do:=c-1;j:=e to b do[c]:=otvet[c]-masst[i,j]*otvet[d];:=d-1;;:=e-1;:=c+1;;:=1;i:=st downto 1 do.Label1.Caption:=form4.Label1.Caption+X+inttostr(f)+=+floattostrf(otvet[i],fffixed,7,5)+;+#13;:=f+1;;.Height:=form4.Label1.Height+85;.Button1.Top:=form4.Label1.Height+5;.Button2.Top:=form4.Label1.Height+5;.ShowModal;EInvalidop do(Нет решения!,mtinformation,[mbok],0);;;EZeroDivide do(Нет решения!,mtinformation,[mbok],0);;;Eoverflow do(Ошибка вычисления!,mtinformation,[mbok],0);;;EConvertError do(Данные введены некорректно!,mtinformation,[mbok],0);;;;;TForm3.StringGrid1KeyPress(Sender: TObject; var Key: Char);key of
0..9:;
0)and(length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])=0)then.Col:=stringgrid1.Col-1;(stringgrid1.Row>1)and(length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])=0)then.Row:=stringgrid1.Row-1;.Col:=stringgrid1.Colcount-1;;;">#8:(stringgrid1.Col>0)and(length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])=0) then.Col:=stringgrid1.Col-1;(stringgrid1.Row>1)and(length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])=0) then.Row:=stringgrid1.Row-1;.Col:=stringgrid1.Colcount-1;;;
#13:stringgrid1.Col<stringgrid1.ColCount-1 then.Col:=stringgrid1.Col+1;stringgrid1.Row<stringgrid1.RowCount-1 then.Row:=stringgrid1.Row+1;.Col:=0;.SetFocus;;;
.,,:(length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])=0)or
0)then:=chr(0);:=chr(44);;">(pos(,,stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])>0)then:=chr(0);:=chr(44);;
0then:=chr(0);;:=chr(0);;;.">-:length(stringgrid1.Cells[stringgrid1.Col,stringgrid1.Row])<>0 then:=chr(0);;:=chr(0);;;.
Unit1_3; // Метод Гаусса (Модуль 3)
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
TForm4 = class(TForm)
Label1: TLabel;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
Form4: TForm4;Unit1_1, Unit1_2;
{$R *.dfm}TForm4.Button1Click(Sender: TObject);.Close;.Close;.Close;;TForm4.Button2Click(Sender: TObject);.Close;;.
Unit17; //Метод Эйлера
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, PARSING;
TForm33 = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Label3: TLabel;
Edit3: TEdit;
Label4: TLabel;
Edit4: TEdit;
Label5: TLabel;
Edit5: TEdit;
Button1: TButton;
Button2: TButton;
Label6: TLabel;
Edit6: TEdit;
Button3: TButton;
procedure Button1Click(Sender: TObject); // выполнить расчет
procedure Button2Click(Sender: TObject); // выход
procedure Edit1KeyPress(Sender: TObject; var Key: Char); // контроль ввода
procedure Edit2KeyPress(Sender: TObject; var Key: Char); // данных
procedure Edit3KeyPress(Sender: TObject; var Key: Char);
procedure Edit4KeyPress(Sender: TObject; var Key: Char);
procedure Edit5KeyPress(Sender: TObject; var Key: Char);
procedure Edit6KeyPress(Sender: TObject; var Key: Char);
procedure Button3Click(Sender: TObject);
procedure Button3MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;
Form33: TForm33;Unit20_1;
9999)or(b>9999))or((a9999))or((a<-9999)or(b<-9999)) then// проверка диапазона(Интервал превышает д