1
. .
1 :
1.1. Turbo Pascal;
1.2. .
2.1.
2.2.
, , :
;
, var;
:
:;
( );
.
, :
, ;
, , , ( Type miss match ).
:
:=
, V:=A; V:=A+1;
, .
, . , .
:
;
:
x + y | |
x - y | |
x * y | |
x / y |
, 5b. 5 b 5*b;
(sin, cos .) , , sin(x), cos(4*x).
(. 1)
1. ,
abs(x) | | x | | real | Real |
integer | integer | ||
sqr(x) | X2 | real | Real |
integer | integer | ||
sqrt(x) | X1/2 | real | Real |
integer | Real | ||
exp(x) | ex | real | Real |
integer | Real | ||
Ln(x) | Ln(x) | real | Real |
integer | Real | ||
Pi | Real | ||
sin(x) | Sin(x) | real | Real |
integer | Real | ||
cos(x) | Cos(x) | real | Real |
integer | Real | ||
arctan(x) | arctg(x) | real | Real |
integer | Real |
|
|
(abs, ln, exp .) , . , .
:
1 sin cos . 180/pi. pi/180;
arctan .
. 1, :
1 random () x, 0<=x<. word. , a<=x<b, , random(b‑a)+a. , random x 0<=x<1. real. , : a<=x<b, random*b+a. random randomize . . ;
frac(x) x. real. , write(frac(0.25*11):4:2); { 0.75};
int(x) x. real. , write(int(422.117):4:2); { 422.00}; , x=int(x)+frac(x).
Pascal :
. , .