.


:




:

































 

 

 

 





1. , . , , - , .

2. f1 f2. f1 f2, f2 - f1. h.

3. f, . f . : , , , .. f g , g : , , , ..

1.

. , . .

2.

. . .

3.

. .

4.

. , . .

5.

. , [1,5].

6.

. .

7.

. , .

8.

. , .

9.

. .

10.

. , .

11.

. . .

12.

. , 4.

13.

. , , .

14.

. .

15.

. , , .

16.

. , , .

17.

. , , . .

18.

. , , .

19.

. .

20.

. , , .

- , . .

record end. , . . :

PaletteType = record

Size: Byte;

Colors: Array[0..MaxColors] of Shortint

end;

ViewPortType = record

xl,yl,x2,y2: Integer;

Clip: Boolean;

end;

FileRec = record

Handle, Mode, RecSize: Word;

Private: Array[1..26] of Byte;

UserData: Array[1..16] of Byte;

Name: Array [0..79] of Char;

end;

: , , . ( ) , . , .. - . , .

1. . - . , , 30 .

: . 7.1.

Turbo Pascal :

Const z:String[3] = ' ';

t:Byte=0;

Type Info = record

q: Byte;

w: Real;

end;

Var luggage: Info;

i,n: Byte;

Begin

Write(' ');

ReadLn(n);

WriteLn (' (

) ');

For i:=l to n do

Begin

ReadLn(luggage.q,luggage.w);

Inc(t,luggage.q);

If (luggage.q=l) and (luggage.w>=30)

then z:='';

End;

WriteLn(' : ',t);

WriteLn(' ',z, ' ');

ReadLn;

End.

. 8.1. - 1

Info - . q ( ) w ( ); Byte Real. Luggage - . , luggage.q luggage.w, .

 

2. : ( ), (, , ) (, , ). : ) ; ) 3 , 5 .

: . 7.2.

Info - . l (), () m (); Word, String[7] String[13]. - Cube. ; ; ; Info.

with, :

with < > do <onepamop>.

with, .

Turbo Pascal :

Uses Crt;

Type Info = record

l: Word;

c: String[7];

m: String [13];

end;

Const n=5;

Cube: Array [l..n] of Info =

((l: 3; : ''; m: ''),

(l: 8; : ''; m: ''),

(l: 3; : ''; m: ''),

(1: 4; : ''; m: ''),

(1: 5; : ''; m: ''));

Var i,ql,q2,q3,q4,q5,q6: 0..n;

v: Longlnt;

Begin

ql:=0;

q2:=0;

q3:=0;

q4:=0;

q5:=0;

q6:=0;

v:=0;

For i:=l to n do

begin

With Cube[i] do

begin

{a} If ='' then Inc(ql);

If ='' then Inc(q2);

If c='' then Inc(q3);

If c='' then Inc(q4);

Inc(v, l*Sqr(l));

{} If (m='') and (l=3)

then

Inc(q5);

If (m='') and (l>5)

then

Inc(q6);

End;

End;

{ }

WriteLn(':',ql,' :',q2,

' :',q3,' :',q4);

WriteLn(' : ',v);

WriteLn(' 3 :',

q5);

WriteLn(' ,

5 : ', q6);

ReadLn;

End.

 

. 8.2. - 2

3. , . f, . .

: Turbo Pascal :

Program Automobile;

Uses Crt;

Const n=10;

found: Boolean=false;

Type Info = record

Brand: String[15];

Number: String[15];

Surname: String [20];

end;

Var Car: Info;

f: File of Info;

z: String[20];

i: 1..n;

Begin

Assign(f,'auto.dat');

{$I-}; { -}

Reset(f);

{$I+}

{ , }

If IOResult<>0 then Rewrite(f);

{ , }

If FileSize(f)=0 then

begin

Writeln(' ! !');

Write(' : ');

Write(' , ');

Writeln(' ');

For i:=l to n do

begin

With Car do

begin

Readln(Brand);

Readln(Number);

Readln(Surname);

End;

Write(f,Car);

End;

Write(' ');

Write(' >>');

ReadLn(z);

While not Eof(f) do

begin

Read(f,Car);

With Car do

If Brand=z

then

begin

found:=true;

WriteLn(Surname:20, Number:20);

End;

End;

If Not found

then

Write(' ');

ReadLn;

End.

. exl68.dat , .





:


: 2016-03-27; !; : 951 |


:

:

, .
==> ...

1804 - | 1556 -


© 2015-2024 lektsii.org - -

: 0.044 .