-, (, ) :
Byte | 0255 | 1 |
Word | 0... 65535 | 2 |
ShortInt | -128127 | 1 |
Integer | -32768...32767 | 2 |
Longint | -2147483648... 2147483647 | 4 |
Single | 7-8 -1.510-45 ...3.410-48 | 4 |
Real | 11-12 -2.910-39 ...2.910-38 | 6 |
Double | 15-16 -5.010-324 ... 1.710-308 | 8 |
Extended | 19-20 -1.910-4951 ... 1.910-4932 | 10 |
:
Read (< >);
Readln (< >);
< > . Enter. , . , ( ) , - .
- Readln(k,t,e);
Readln; Enter .
:
Write (< , >);
Writeln (< , >);
, Write(2+, ); Writeln (A=, ); Write(, ); . , , - .
Real .
- , .. , , , .
: Write(:5:2,:6:3); - 5 , , . + . 2,5678, : _2.56
:
div | a b | C:=a div b; | ||
mod | a b | D:=a mod b; |
, Y:= 25 div 3; ( Y 8), Y:= - 25 div 4; ( Y -6), Y:= 13 mod 3; ( Y 1), Y:= 13 mod 4; ( 1).
, :
trunc(x) | x ( ) | ||
int(x) | x | ||
round(x) | x | ||
Frac(x) |
|
|
: Y:=trunc(13.999); ( Y 13), Y:=frac(13.111); ( Y 0.111), Y:=round(3.145); ( Y 3), Y:=round(-12.5); ( Y -13), Y:=int(2.7) ( Y 2), Y:=int(-32.3) ( Y -32).
CHAR , (, , ). CHAR .
( Boolean) , - true (1) - false (0). . :
= | |||
<> | |||
And | ( , ) | ||
Or | ( , ) | ||
Xor | ( 1, ) | ||
Not | |||
, 1 , 1 | , true, false | ||
CHAR :Var c: char; | BOOLEAN , Varc,: boolean; | ||
( ASCII). . | : =,<>,<,<=,>,>= ( ) Not, And, Or, or( ) , . | ||
, : | - X>2 - (X>2) and (X<=10) , . | ||
:=a; Writeln(C=,c); | X:=4; A:=(X>2) and (x<=10); If A=True then y:=1 else y:=1/x; | ||
, :
Pred(x) | |||
Succ(x) | |||
Ord(x) | . , Ord(A) - 65 | ||
Chr(x) | . , Chr(65) - A | CHAR |
:
, y=x2. | Var x:real, y:real; |
, . | Var r1,r2,s:real; |
Y=-2,7x3+0,23x2-1,4 | Y:=-2.7*x*x*x+0.23*x*x-1.4 |
, | Vara,b,c,d:integer; Begin Writeln( ); Readln(a,b); := a div b; d:= a mod b; Writeln( - , c); Writeln( - ,d); Readln; end. |
: | Var Y,x:integer; Begin Write(x=); Readln(x); Y:=5*x*x+9*x+12; Writeln(Y=,Y); End. |
l, R (l=2πR) | Const π=3.14; Var R:integer; L:Real; Begin Write(R =); Readln(R); L:= 2*π*R; Writeln(L =, L); End. |
|
|
, .
( )
, .
. . , ().
. , (;), begin end. .
Begin
1;
2;
..................
n-1;
n;
End.
Begin (), end () . Begin end ; . , .. .
. . . . . : if case.
If. If () .
- IF.
: if <> then < 1> [ else < 2> ];
, .
1, 2 , , .. , begin end.
, .
:
¨
¨ (), 1
¨ (), 2
¨ else < 2> , , , if .
, a b . | if a > b then writeln ( a - , a) else writeln ( b - , b); |
! else . . else , if. , then else .
: if <> then < 1>;
: f(x) x. | if x<0 then y=x; if x=0 then y=0; if x>0 then y=sqr(x); |
|
|
, () ( 1 2). , .. . ( ).
Case . . , . , , .
- CASE
:
ase < > of
< 1>:<1>;
< 2>:<2>;
...................................
< N>:< N>;
lse < n+1>]
End;