.


:




:

































 

 

 

 


. Delphi




Delphi

Delphi , .

.

.

Delphi . , ( FOR). ( WHILE) ( REPEAT).

 
 

(. 1.).

 

. 1. .

 

While <> Do < >

<> .

.. <> , < > , <>.

Do .

1: I:=1; S:=0; N:=10; { }

While I <=N Do { }

Begin

S:=S+I; { }

I:=I+1; {}

End;

2: Max:= A[1]; I: =2;; N:=10; { }

While I <=N Do { }

Begin

IF A[I] >Max Then { }

Max:= A[I];

I:=I+1; {}

End;

(. 2.).

:

Repeat

;

[;

;]

Until <>

<> .

 

 
 

. 2. .

 

:

, <>. , <> False, , <> True.

. . , , .

: I:=1; S:=0; N:=10; {}

Repeat

S:=S+I; { }

I:=I+1; {}

Until I>N; { }

, , , .

:

For < > := < 1>

< 2> Do <>.

For < > := < 1> Downto

< 2> Do <>;

, For .

, 1, 2 .

.. , 1 2 Real.

, Do.

For , , .

Integer, ( ForTo) ( ForDownTo) ... For , .

1: S:=0; N:=10;

For I:=1 To N Do

S:=S+I; { }

 

2: Max:= A[1]; I: =2;; N:=10;

For I:=1 To N Do

IF A[I] >Max Then

Max:= A[I];

- , .

( ). . , .

- , , , , .

:

- () ,

- .

Delphi .

: B [3]

MAS [i, j].

, , , . .

, , , .

:

Type < > Array [< />] of < >.

< /> .

1: Type 1= Array [1..50] of real;

Var 1, 2:TT1;

.

2: Var A3, A4: Array [1..5, 1..50] of integer;

.

2.4.2. Delphi, /

Delphi / StringGrid, Additional . Cells, , . .

, 3.

 
 

. 3. StringGrid.

 

StringGrid , , . . .

StringGrid :

 

FixedCols  
FixedRows  
Rowcount  
Options [goEditing]

 

[goEditing] Options .






:


: 2016-09-06; !; : 1862 |


:

:

, , . , .
==> ...

1410 - | 1250 -


© 2015-2024 lektsii.org - -

: 0.013 .