.


:




:

































 

 

 

 


 

: (Id1, , Idn), Idi .

: { Id1, , Idn}

: .

Id1< Id2<<Idn

succ(Idi) = Idi+1

pred(Idi+1) = Idi

. ord, .

ord(Idi) = i

, . , , .

type tcolor=(red,green,blue);

tweek=(mon,tue,wen,th,fri,sat,sun);

trainbow=(red,orange,yellow,green,blue,violet);

Var x:tweek;

: , .

: , .

Program weekend(input,output);

Type tweek=(mon,tue,wen,th,fri,sat,sun);

Var x:tweek;

b:boolean;

begin

read(x);

b:=false;

if x=sat then b:=true

else if x=sun then b:=true;

write(b)

end.

: - . , x.

 

: c1..c2, 1, 2 .

: [c1,c2]

:

, , .

Var i:1..10;

begin

i:=9; i:=-1;...

, , .

 

Inc(x) ~ x:=succ(x)

Dec(x) ~ x:=pred(x)

Case c of

1: S1;

n: Sn; [else Sn+1]

End

, , i- , (a..b), , .

x:=c; { }

:

Var n:1..7;

Begin

Read(n);

Case n of

1: x:=mon;

2: x:=tue;

3: x:=wen;

4: x:=th;

5: x:=fri;

6: x:=sat;

else x:=sun

end;

case x of

mon..fri: write();

sat,sun: write();

end;

end.

 

:

For v:=e1 to e2 do s

v , e1, e2 , s .

:

, . s v.

 

, . , . , . , , . , . , |a|>E

: |ai|<eps

 

.

(Boolean, , . )

: {true, false}

: .

: 1<sqr(x)+sqr(y)<n

not b ┐b

b1 and b2 b1&b2

b1 or b2 b1vb2

Boolean x Boolean → Boolean

b not b   b1 b2 b1 and b2   b1 b2 b1 or b2
true false False True   true false false true true true false false true false false false   True true false false true false true false true true true false

 

 



<== | ==>
Pascal |
:


: 2018-10-15; !; : 280 |


:

:

, , .
==> ...

1825 - | 1480 -


© 2015-2024 lektsii.org - -

: 0.045 .