:
11.09.17

14.08.17

26.06.17

17.06.17

09.06.17
?
17.05.17
-?
04.05.17
:
29.04.17
:
26.04.17

17.04.17

.2017
.......
  12345
6789101112
13141516171819
20212223242526
27282930   
!!!
!!!
.
.
, .

, , , :

! () . , Word, , , ( pic), , , .., .

:

;

;

( : ; , . );

.

.

: *, /, -, +, div, mod

(a div b) b (a mod b) , b.

(,b-).

a div b=   a mod b =a-((a div b)*b)

17 div 3 = 5 17 mod 3 = 2 8 div 2 = 4 8 mod 2 = 0 1 div 5 = 0 1 mod 5 = 1

:

1. a b a*b;

2. 젠 n/-2 n/(-2);

3. : ;div, mod; *, /; +, -;

4. .

.

(63 ).

.

Shortint - (1 ). (-128   127)

Longint - (4 ). (-231  231-1)

Integer - (2 ). (-32768  32767)

Word - (2 ). (0  65535)

Byte - (1 ). (0  255)

: Maxint = 32767 (215-1) Maxlongint = 231-1

.

Boolean - (1 ) 2 :

True ()

False ()

. 2 :

(=)

(< >)

:

False< True

:

And ()

Or ()

Not ()

Ord (false) = 0 Ord (true) = 1

.

Chor - (1 )

(, , , , ). - , 9.

.

String - (255 ).

  .

.

Real - (6 )

(11 ).

:

1.

0,5; +5,0; -133,15

1200 = 120,0 +1 = 12,0 +2 = 1,2 +3 = 12000,0 -1 (   38)

.

.

  sin (x) sin x (.)

cos (x) cos x (.)

arctg(x) arctg x (.)

exp (x) ex (.)

ln (x) ln x (.)

pi (x) 3.14 (.)

abs (x)   (.)

sqr (x) x2 (.)

sqrt (x)   (.)

trunc (x) , . ()

trunc (3.7) = 3 trunc (3.1) = 3 trunc (-3.7) = -3

frag (x) ࠠ (.)

int (x)  (.)

int (3.4) = 3 int (3.7) = 3 int (-3.4) = -4

round (x)  ( -) (.)

round (3.14) = 3 round (3.74) = 4 round (-3.14) = -3

random (x) (.)

0 x; x , 0  1

odd (x) TRUE, x - 堠 (.)

, , , . .

. .

, , :

program <>;

< >;

< >;

begin

< >;

end.

:

program ;

begin ;

end .

<> - ( ).

.

, .

var .

program ff;

var

i, n: integer; x,y,z: real;

begin;

.........

end.

:, ;, ,.

: label.

: const.

: type.

.

, , . ;.

:

;

;

.

:

begin

< 1>; < 2>;

end;

.

.

: = .

<> : = <>;

    .

:

  ;

. , - ().

, .

-.

READ (< - >)

- ;

- , .

WRITE (< - >)

- ;

- , .

READLN (a, b, c) - a, b c .

WRITELN - .

WRITE .

Writeln ( _ a = , a:8:3, _ b = , b:4);

a = 341.154, b = 2

_ a = _ 341.154 _ b = _ 144

a = 1.3, b = 144

_ a = _ _ _ 1.300 _ b = _ 144

Program _ prim;

lrscr - ;

var a, b: integer;

x ,y: real;

begin writeln ( a, b );

readln ( a, b);

x: = a + b; y: = a/b;

writeln ( x = , x:8:3, _ _ , y = , y:8:3)

end.

, .

.

. , .

label N1, N2 ;

.

N1, N2, - () (0  9999).

: GO TO N; - N.

program pr;

label 3;

var

x, y: real;

begin

3: readln (x, y);

go to 3;

end.

: IF < > THEN P1 [ ELSE P2 ]; ( )

<> - ;

P1, P2 - .

:

<> - "", P1 (true);

- " ", P2 (false).

蠠 ELSE - <> - "", .

:

IF a>b THEN write (a) ELSE write (b).

:

Y =

If x>=0 then y:= sin(x) else y:= - sin(x);

, : AND () OR () NOT ().

IF (a>b) and (a>c) THEN writeln (a = , a)

IF a<0 THEN

  (P1)

ELSE

  c (P2)

IF.

IF n>0 THEN

IF ( m div n)>n THEN

m: = m-n

ELSE

m: = m + n;

ELSE - IF.

n>0 (m div n)>n m: = m-n.

n>0, (m div n)  n m: = m + n.

n  0 - .

:

: y=

Program fun;

var

x, y: real;

begin

writeln ( x); readln (x);

if x>90 then writeln ( )

else begin

if x<0 then y: = 0

else y: = SIN (x*PI/180);

writeln (y = ,y:8:3);

end; ( )

end.

CASE OF; IF.

:

CASE N of

N1: P1;

N2: P2;

NN: PN;

[else P;] - .

end;

N - , .

N1, N2, NN - N.

P, P1, P2, PN - .

:

- N = N1, P1 ( 󠠠 젠 case ... of);

- N = N2, P2, P.

else - N - , case of .

.

, , .

.

:

- ;

- ;

- .

FOR i: = N TO K DO P

() () ()

i - ;

N, K - ;

P - ;

I, N, K - .

i - 1.

K

FOR i: =N DOWNTO K DO P

.

S= 1+1/2+1/3+ +1/50

- Sum. . , , . Sum = 0.

Program sum;

Var

i: integer;

sum: real;

begin

sum: =0;

for i: = 1 to 50 do

Sum: = sum + 1/i;

Writeln (' = ', Sum);

end.

for , +1, -1.

.

REPEAT

  -

UNTIL <>;

P1, P2, PN - .

" ", <>, , . , <> .

: <> , .

: y = a sin (x ) , x =   ,     =0.2

program fun;

var

y, a, x: real;

begin

x: =0; read (a)

repeat

y: = a *sin (x); writeln (y, x); x: = x + 0.2;

until x>1;

end.

, , .

.

WHILE <> DO P;

P - .

<> , , - P, <> . .

, P - , <>.

, P - , .

: y = sin x, x  , x  ,   - .

.

Program cikl;

var

y, x, x k, d x: real;

n, k: integer; SP, n - .

SP, S0: real; S0, k - .

begin

writeln (' x - , x - , d x - ');

read (x, x k, d x);

SP: =0; S0: = 0; n: =0; k: =0;

While x< = k x do.

P   .

if n=0 then writeln (' ')

else writeln (' = ', SP/n);

if k=0 then writeln (' ')

else writeln (' = ', S0/k);

end.

1:

.

Program sum-prois;

uses crt;

const

n = 100;

var

a: array [1n] of real;

n, k, i: integer;

p, s: real;

begin

clrscr; s: = 0; p: =1;

writeln (' '); readln (nk);

writeln (' ');

for i:=1 to nk do

readln (a[i] );

for i:=1 to nk do

begin

s:= s + a[ i ];

p:= p * a[ i ];

end;

writeln ('. = ', s, '. =' , p);

end.

:

- - s=0

- - p=1.

100 (n=100).

(nk).

. for .

.

.  .

:

a - ;

n, m - .

- n  m.

a[i, j] - i- j- .

.

a[i, i] - .

a[i, 2] - .

1.

⠠ .

Program matrix;

const

n=10;

m=10;

var

a: array [1n, 1m] of real;

i, j: integer; n, m: integer;

s: real;

begin s:=0;

writeln (' m, n);

readln (n, m);

{ :}

for i:=1 to n do

for j:=1 to m do

readln (a[i, j]);

for i:=1 to n do

for j:=i to m do

s: s+a[i, j];

writeln('s=', s);

end.

.

i - ;

j - ;

i - j.

.


! () . , Word, , , ( pic), , , ..,
: 20.08.10 | [ + ]   [ - ]  
: 147
: 0
20.08.10
20.08.10
20.08.10
20.08.10
20.08.10
{dnmbottom}
70 000 , , , .