Типовой расчёт №1 по Мат. Анализу
Интерфейс:
Код программ:
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Menus;
type
TForm16 = class(TForm);
TForm15= class(TForm);
TForm14 = class(TForm);
TForm13 = class(TForm) ;
TForm12 = class(TForm);
TForm11 = class(TForm);
Button1: TButton;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Label1: TLabel;
MainMenu1: TMainMenu;
N1: TMenuItem;
N11: TMenuItem;
N21: TMenuItem;
N31: TMenuItem;
N41: TMenuItem;
N51: TMenuItem;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure N11Click(Sender: TObject);
procedure N21Click(Sender: TObject);
procedure N31Click(Sender: TObject);
procedure N41Click(Sender: TObject);
procedure N51Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form16: TForm16;
Form15: TForm15 ;
Form14: TForm14;
Form13: TForm13;
Form12: TForm12;
Form11: TForm11;
Implementation
procedure TForm16.Button1Click(Sender: TObject);
begin
Form10.Visible:=true
end;
procedure TForm16.Button2Click(Sender: TObject);
begin
Form11.Visible:=true
end;
procedure TForm16.Button3Click(Sender: TObject);
begin
Form13.Visible:=true
end;
procedure TForm16.Button4Click(Sender: TObject);
begin
Form14.Visible:=true
end;
procedure TForm16.Button5Click(Sender: TObject);
begin
Form15.Visible:=true
end;
procedure TForm16.N11Click(Sender: TObject);
begin
Form10.Visible:=true
end;
procedure TForm16.N21Click(Sender: TObject);
begin
Form11.Visible:=true
end;
procedure TForm16.N31Click(Sender: TObject);
begin
Form13.Visible:=true
end;
procedure TForm16.N41Click(Sender: TObject);
begin
Form14.Visible:=true
end;
procedure TForm16.N51Click(Sender: TObject);
begin
Form15.Visible:=true
end;
end.
\\\\задача 1
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm10 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form10: TForm10;
implementation
{$R *.dfm}
procedure TForm10.Button1Click(Sender: TObject);
var
a,b,c,d:real;
begin
a:=(2/3)*sqrt(64);
b:=(2/3)*sqrt((strtoint(edit1.Text)+4)*(strtoint(edit1.Text)+4)*(strtoint(edit1.Text)+4));
c:=2*(strtoint(edit2.Text))-(2/3)*(strtoint(edit2.Text))*sqrt(strtoint(edit2.Text));
d:=0;
edit3.Text:=Floattostr(a-b+c-d);
end;
end.
\\\\Задача 2
unit Unit11;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm11 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form11: TForm11;
implementation
{$R *.dfm}
procedure TForm11.Button1Click(Sender: TObject);
var a,b:real;
begin
a:=pi*(25*ln(strtoint(edit1.Text)+1)-(1/2)*(strtoint(edit1.Text)+1)*(strtoint(edit1.Text)+1)+2*(strtoint(edit1.Text)+1)-ln(strtoint(edit1.Text)+1));
b:=pi*(25*ln(strtoint(edit2.Text)+1)-(1/2)*(strtoint(edit2.Text)+1)*(strtoint(edit2.Text)+1)+2*(strtoint(edit2.Text)+1)-ln(strtoint(edit2.Text)+1));
edit3.Text:=floattostr(a-b);
end;
end.
\\\\ Задача 3
unit Unit13;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm13 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Label4: TLabel;
Edit3: TEdit;
Edit4: TEdit;
Button1: TButton;
Edit5: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form13: TForm13;
implementation
{$R *.dfm}
procedure TForm13.Button1Click(Sender: TObject);
var a,b,c,d:real;
begin
a:=(3/2)*(strtofloat(edit1.Text))+2*sin(strtofloat(edit1.Text))+(1/4)*sin(2*strtofloat(edit1.Text));
b:= (3/2)*(strtofloat(edit2.Text))+2*sin(strtofloat(edit2.Text))+(1/4)*sin(2*strtofloat(edit2.Text));
c:=(1/2)*(strtofloat(edit3.Text)+(1/2)*sin(2*strtofloat(edit3.text)));
d:=(1/2)*(strtofloat(edit4.Text)+(1/2)*sin(2*strtofloat(edit4.text)));
edit5.Text:=floattostr(a-b+c-d);
end;
end.
\\\\\\\\ Задача 4
unit Unit14;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm14 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form14: TForm14;
implementation
{$R *.dfm}
procedure TForm14.Button1Click(Sender: TObject);
var a,b:real;
begin
a:=(sin(2*strtofloat(edit1.Text))/cos(2*strtofloat(edit1.Text)))-strtofloat(edit1.Text);
b:= (sin(2*strtofloat(edit2.Text))/cos(2*strtofloat(edit2.Text)))-strtofloat(edit2.Text);
edit3.text:=floattostr(a-b);
end;
end.
\\\\\ Задача 5
unit Unit15;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm15 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Edit3: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form15: TForm15;
implementation
{$R *.dfm}
procedure TForm15.Button1Click(Sender: TObject);
var a,b:real;
begin
a:=2*pi*(strtofloat(edit1.Text)/2*sqrt(strtofloat(edit1.Text)*strtofloat(edit1.Text)+4)+2*ln(strtofloat(edit1.Text)+sqrt(strtofloat(edit1.Text)*strtofloat(edit1.Text)+4)));
b:=2*pi*(strtofloat(edit2.Text)/2*sqrt(strtofloat(edit2.Text)*strtofloat(edit2.Text)+4)+2*ln(strtofloat(edit2.Text)+sqrt(strtofloat(edit2.Text)*strtofloat(edit2.Text)+4)));
edit3.Text:=floattostr(a-b);
end;
end.
