.


:




:

































 

 

 

 


4.

. .

, , , . - . TurboPascal.

C ( , ) - , . , () .

- . (). 2 : .

- , , () () .

. 1968 , . , () , . , , , ,

TurboPascal

, . , . , 63 , - 5-10 ( 1).

1 - Pascal

 

,
boolean : 1 true false
char : ASCII- 1 0 255 (28=256)
integer 2 215
word 2 216 - , 16-
longint : 4 231
real 11-12 6 ~ 2.9*10-39 - 1.7*1038

 

1 - Pascal

 

double 15-16 8 ~ 5*10-324 1.7*10308
string char 1 255 2-256 ,

 

() , , . . 6 , ( 2).

 

2-

1

*
/
div 2
mod 2

2

+
-

 

div mod . :

Vary, c, n: integer;

y:=2009;

c:=y div 100;

n:= y mod 100;

20, n 9.

( 3) , . , , , , . turbo.tpl. : , . , .

 

3

| x | abs(x) x Integer (I) Real (R)
x 2 sqr(x) x I R, r
sin x cos x arctg x sin(x) cos(x) arctan(x) I R, R
ex ln x exp(x) ln(x) I R, R
sqrt(x) x I R, R
p pi , p R
  trunc(x) , R, I
  frac(x) R
  round(x) R, I

 

. :

:= ;

: =

: , :=, , . ,

k:=k+2

k 2.

.

:

read(_);

readln(_).

readln read , , Enter .

:

var a,b,c:real;

...

read (a,b,c);

a=1, b=4, c=2.5 :

1_4_2.5

_ , - Enter.

, , . :

write();

writeln();

writeln

.

, .

program Equation;

var a,b,c,d,x1,x2:real;

begin

writeln;

writeln ('a,b,c:');

read (a,b,c);

d:=sqr(b)-4*a*c;

if d<0 then

writeln('Reshenii net')

else

if d=0 then

writeln('x=',-b/(2*a):2:3)

else

begin

x1:=(-b+sqrt(d))/(2*a);

x2:=(-b-sqrt(d))/(2*a);

writeln ('');

writeln (x1:10:2,x2:10:2);

readln; readln;

end;

end.

1) . - .

2) .

3) TurboPascal.

4) .

1

, (1;1),(2;2);(3;3) .

2

.

1

=+ b+ c, , b, c- . , b, c :

, :

1 1 1
2 2 2
3 3 3
4 1 1
5 2 2
6 3 3
7 storona1
8 b storona2
9 storona3
10 perimetr
11 Sqrt()

2

:

, b, c- , .

, :

 

1 storona1
2 b storona2
3 c storona3
4 p poluperimetr
5 s square

1) .

2) .

3) ?

4) ?

5) , , TurboPascal?

 



<== | ==>
. | 
:


: 2018-10-18; !; : 184 |


:

:

, .
==> ...

1542 - | 1381 -


© 2015-2024 lektsii.org - -

: 0.021 .