.


:




:

































 

 

 

 


, , Turbo Pascal




 

: , .

:

  1. ⳿ ;
  2. 1 .
  3. 2 Turbo Pascal.

 

: 4,5, 1, , , .

 

:

  1. Turbo Pascal;
  2. Turbo Pascal .

 

:

1. .. , , 㳿 : , 2003

2. . Turbo Pascal - : , 2008

, 䳿 , , . , , , , , , 䒺, 2 , , , г . 3 , . : <> <ò 1> <ò>;

, , . ³, £, <, =, >, ¹. : (, ), (, ). , , , .

Turbo Pascal ³, £, ¹, , : >=, <=, <>. and(), or(), not(). , Turbo Pascal:

4) xÎ[-2; 5], i x¹0 - Turbo Pascal: (x>=-2) and (x<=5) and (x< >0);

5) z³20 3 - Turbo Pascal: (z>=20) and (z mod 3 = 0);

6) xÏ[-2; 5] - Turbo Pascal: (x>5) or (x<-2).

: TRUE () FALSE (). , .

:

And () .

A B A and B
false false false
false true false
true
.1
false

false
true true true

, TRUE (), .

, .

 

A B A or B
false false false
false true true
true
.2
false

true
true true true

Or () , . , TRUE, .

Not () , , .

, : , , .

:

1. (z>=20) and (z mod 3 = 0); z = 40 z>=20 true, z mod 3 = 0 false, .1 false.

2. (x>=-2) and (x<=5) and (x< >0); = 1 , true. = 6 , false. false.

3. (x>5) or (x<-2); = 6 x>5 true, x<-2 false, .2 true.

 

. , . ij .:

 

, 3- : ∉[a;b] 3. a, b - , .

1. :

a b F(a, b) a b F(a, b)
  ((a >0) and (b>0)) or ((a <0) and (b<0)) -3          
  ((a>0) or (a<-5)) and (b mod 2 = 0) -4          
  (a>=3) and (b<0) and (a<b) or (a=b)   -2        
  not ((a>=b) and (a>=0) and (b<=0))   -3        
  ((a>b) and (a>0)) or (not(a=b)) -2 -2   -2    
  ((a>1) and (a<=8)) or (not (a<>b)            
  not(a*b>0) or (a>b) and (b<0)   -2   -1 -1  
  (a>-2) and (a<2) or (b>-2) and (b<2)         -3  

2. Turbo Pascal:

1. X, Y, Z , 2 䒺;

2. X, Y, Z 0;

3. X, Y, Z 5 0;

4. X, Y, Z ;

5. X, Y, Z 2 ;

6. X, Y, Z ;

7. X, Y, Z Y Z;

8. X, Y, Z , .

 





:


: 2015-10-27; !; : 574 |


:

:

, , 1:10
==> ...

1909 - | 1814 -


© 2015-2024 lektsii.org - -

: 0.009 .