.


:




:

































 

 

 

 


StringGrid

, , '. , , .

( ), ( ) .

, .

               

.

, - , .

:

': array [_.._]

: ' ' ;

array Delphi, , ' ' ;

_ _ , , , () ;

.

3.

temper:array[1..31] of real;

f:array[0..2] of integer;

name:array[1..30] of string[25];

- , .

const

NT = 18; //

SN = 25; // var

team: array[1..NT] of string[SN];

4.

:

;

;

;

;

.

ϳ 쳺 ( ) . Delphi . Memo StringGrid.

StringGrid

StringGrid. StringGrid Additional.

StringGrid , .

StringGrid.

Name ' .
ColCount ʳ
RowCount ʳ
Cells[i,j]); ³ . , col row lls [col, row]
FixedCols ʳ .

 

1.

[1..N], N=7. StringGrid. Label.

: StringGrid, Button1, Button2, Label.

StringGrid:

ColCount  
RowCount  
Options/goEditing True
FixedCols  

 

:

procedure TForm1.Button1Click(Sender: TObject);

const n=6;

var a:array[1..n] of integer;

i,s:integer;

Begin

for i:=1 to n do

begin

a[i]:=StrToInT(StringGrid1.Cells[i-1,0]);

end;

s:=0;

for i:=1 to n do

if a[i]>0 then s:=s+a[i];

label1.Caption:='S='+IntToStr(s);

End;

N M . , , 1, , , - 0. , , .

program voyage;
var R:array[1..30,1..100] of byte;

 

, j, n, m, count: integer;
begin
write (' : ');
repeatreadIn(n) until (n > 0) and (n <= 30);
write (' : ');
repeatreadln (m) until (m > 0) and (m <= 100);
writeln (' : ');
for i:= 1 to n do for j:= 1 to m do beginwrite (i, ' , ', j, ' : ');
repeatreadln(R[i,j]) until (R[i, j] = 0) or (R[i, j] = 1) end;count:= 0;
for := 1 to n do
for j:= 1 to m do
if R[i. j] = 0 then count:= inc (count);
writeln ('ʳ : ', count:5);
repeat
until
Key
Pressed

end.

 



<== | ==>
. | 
:


: 2017-04-04; !; : 230 |


:

:

- , , .
==> ...

1527 - | 1339 -


© 2015-2024 lektsii.org - -

: 0.01 .