.


:




:

































 

 

 

 





: , S(x) x1 x2 h.

.

.3.1.

 
 

.3.1.

 

.

 

Unit Rab_3;

Interface

Uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;

 

Type

Tform1=class(TForm)

Memo1:Tmemo;

Button1: Tbutton;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Edit1:Tedit;

Edit2:Tedit;

Edit3:Tedit;

Edit4:Tedit;

procedure Formreate(Sender: TObject);

procedure Button1lick(Sender: TObject);

private

{Private declarations}

public

{Public declarations}

end;

var

Form1:TForm1;

Implemetation

{$R*DFM}

procedure TForm1.FormCreate(Sender: TObject);

begin

Edit1.text:= 0;

Edit2.text: = '2';

Edit3.text:= '5';

Edit4.text:= '0,25';

Memo1.Clear;

Memo1.Lines.Add('. 4. . .107227 ..');

 

Procedure Tform1.Button1Click(Sender: TObject);

Var

x1, x2, x, h, a, s: extended;

N, k, c: integer;

begin

xl:= StrToFloal(Edit4.Text);

Memo1.Lines.Add('x1 = ' + Edit1.Text);

x2:= StrToFloat(Edit2.Text);

Memo1.Lines Add('x2 = ' + Edit2.Text);

N:= StrTolnt(Edit3.Text);

Memo1.Lines.Add(N = ' + Editl.Text);

h:=StrToFloat(Edit4.Text);

Memo1.Lines.Add(h = ' + Edit4.Text);

C:=-1;

X:= x1;

Repeat

A:= 1;

S:= 1;

for k:=1 to N do

begin

a:= c*a*x/k;

s:= s + a;

end;

Memo1.Lines.Add('np x = ' + FloatToStrF(x, ffFixed, 6, 2) +

' = ' + FloalToStrF(s, ffFixed, 6, 2));

x:= x+h;

until x>x2;

end;

end.

 

e (N=2, X1=0,X2 = 1, h=3), (N:=), F4. F7, , .

 

. .

 

1 15 (.3.1) Y(x) S(x) x0 xk h = (x0-xk)/10. S(x) Y(x) x S() Y(x).

3.1

S(x) Y(x)
           
           
  0.1    
  0.1    
  0.1    
  0.1    
  0.1    
  0.1    
  0.1    
  0.1    
  0.1    
  0.1 0.5   arctgx
  0.1    
  0.1    
  -2 -0.1  
  0.2 0.8  
  0.1 0.8  

16. k n.

17. t 1 0 , k 3.

18. n . .

19. , . .

20. n>0 n , . .

21. n . , .

22. n . , .

23. k , n (). (/, div, mod) .

24. , ( ).

25. t 1 0 , n .

26. n. , 3 .

27. . .

28. n>0, n . , .

29. n. n.

30. n. n .


4.

: TStringGrid. .

 

, . , , , : [1], bb[I], 12[I, j*2], q[l, 1, I*j-l]. LongInt.

(Type) (Var) Array :

Array [ ] of < >

:

Const N=20; // ;

Type

Tvector = array [1..N] of real; // ;

Var

A: Tvector; //A - Tvector;

Ss: array[1..10] of integer; //Ss - ;

Y: array[l..5, 1..10] of char; //Y - .

, , :

F:= 2*a[3] + a[ss[l] + 1]*3;

A[n]:= 1+sqrt(abs(a[n-1]));

TstringGrid

 

, TstringGrid. , ( TEdit).

Cells[ACol, Arow: Integer]: string;

ACol, Arow - . ColCount RowCount , FixedCols FixedRows . , .

 





:


: 2016-07-29; !; : 809 |


:

:

, .
==> ...

1565 - | 1366 -


© 2015-2024 lektsii.org - -

: 0.014 .