...
...

  1. III. - , .
  2. .
  3. . , ,
  4. -
  5. shell-.

7.2. . . , .

7.1 N , . ( S), T. ϳ , ' .

7.1.

(* *)

PROGRAM EX8;

VAR

I: INTEGER; (* *)

N: INTEGER; ( * ʲʲ * )

S: REAL (* , *)

T: REAL; ( * ͪ * )

BEGIN

T: = 0;

WRITELN ( ' :');

READ (N);

FOR I: = 1 TO N DO

BEGIN

WRITE ( 'IJ :');

READ (S);

T: = T + S;

END;

T: = T / N;

WRITELN ( '--- ---------------------');

WRITELN ( ' =', T: 5: Z)

END.

:

IJ : 8

IJ : 7

IJ : 5

IJ : 9

IJ : 7

IJ : 9

= 7.50

7.2. , . ³, - R, DR; - RK.

(* '' *)

PROGRAM E10;

CONST PI = 3.14;

VAR

R, RK: REAL; (* *)

V, VH: REAL; (* " *)

DR: REAL; (* *)

BEGIN

WRITELN ( 'IJE R:');
READ (R);

WRITELN ( 'IJE ʲ RK:');

READ (RK);

WRITELN ( 'IJ PR:');

READ (DR);

VM: = 0;

WHILE R <= RK DO

BEGIN

V: = 4 * в * R * R * R / 3;

VM: = VM + V;

WRITELN ( 'R =', R: 6: 2, '': 5, 'V =', V: 7: 3);

R: = R + DR;

WRITELN ( '* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *' );

WRITELN ( ' " : VH =', V M: : 3)

END.

7.4. . ϳ . , , WHILE. . (NOTEOLN), .

7.3.

(* "" *)

PROGRAM E3;

VAR

BUK: CHAR; (* *)

K: INTEGER; (* *)

N: INTEGER; (* 8ײ Ѳ ˲ *)

BEGIN

K: = 0; N: = 0;

READLN;

WRITELN ( 'IJ :');

WHILE NOT EOLN DO

BEGIN

READ (BUK);

N: = N + 1;

IF BUK = 'T' THEN K: = K + 1

END;

WRITELN;

WRITELN ( 'ʲʲ ˲ ֲ =', N: 3);

WRITELN ( ' "" ֲ =', ; 3)

END.

7.5. 7.4, .

7.4

(* ² 0 20 ϲ 0.1 *)

PROGRAM E6;

CONST

CONST1 = 1.8; (* *)

CONST2 = 32.0; (* *)

VAR

CENTEMP: INTEGER; (* *)

FARTEMP: REAL; (* *)

BEGIN

WRITELN ( 'o * ");
FOR CENTEMP: = 0 TO 20 DO

BEGIN

FARTEMP: = CENTEMP * CONST1 + CONST2;

WRITELN (CENTEMP: 3, '': 8, '*', '', FARTEMP: 6: 1);

END

END.

1. READ?

2. ?

3. ?

4. , ?

5. READLN?

6. ?

7. ?




. | . | LL ; | . | 5.4 | . | | . | . | . |

...
© um.co.ua -