.


:




:

































 

 

 

 





: , .

:

1. REPEAT, WHILE, FOR ( ). -.

2. , .

3. .

: Pascal (TP BP), ABCPascal, FreePascal.

: IBM.

  1. .
  2. .
  3. ( ).
  4. .

1_ (3 ). 3- -.

2 _ ( For). - .

3 _ (2 while repeat). -.

4_ - .

5_ ( )

4 5 -. .

  1. .

  1. ? ?
  2. For, repeat while. ( ? ? . ? .? ?)

3. :

a) For k =-1 1 Do... b) For =10 To 20 Do.. c) For k =20 To 10 Do d) k:=5; r:=15; For i =k+l To r-1 Do

4. s :

s:=0; n:=10; For i:=2 To n Do s:=s+100 div i;

5. ? . .

6. Break continue. . ?

 

7. :

7.1 7.2 7.3 7.4 7.5
1, 20, 17, 6, 10, 13. readln(x); m:=x; while x<>13 do begin readln(x); if x>m then m:=x; end; writeln(m); b:= 0; a:=10; Repeat b:= b*10 +a; a:= a Div 2; until (a>3) Write(b); ?     s:=1; for i:=1 to 5 do if i>2 then s:=s*i; writeln(s); a:= 1; b:= 1; For i:= 0 To n Do Begin For j:= 1 To b Do Write('*'); Writeln; c:= a + b; a:= b; b:= c; End; n = 6? ?   x:=1; y:=2; for i:=1 to 3 do while x<i*3 do begin x:=x+y; y:=y+1; end;

 

- , . . . , . .

:

1) ;

2) ;

3) ;

4) , .. , , .

3 :

1) for,

2) while,

3) repeat... until.

-, , . 1.

i ; i0 ; iT ; iS ( Pascal +1 1).

- i, i0 iT iS (.. i0, i0+iS, i0+2iS, i0+3iS , ). i [ i0 ,iT ], .

. 1 -

Pascal :

For i:=i0 to iT do <>

For, to, do (, , );

i ( ) - INTEGER (, , );

i0 ( ) iT ( ) ;

<> - Pascal ( ). beginend.

+1.

For i0 i:=i0 . :

- i<= iT ; , For ;

- <>;

- .

For, .

For, 1. For :

For i:=i0 downto iT do <>

1. f=x+e -x =0, 1, 2, , 10 .

:

WhileDo - .2 :

While <> Do <>

While, Do ( [ ], );

<> - ;

< > - , ( ).

(True), < >, . (False), While .

.2 -

, .

2.

e=0.01, .. , k - (k+1)- e.

:

Repeat < > Until <>

Repeat, Until (, [ ]);

< > - ;

<> - .

, <>: (FALSE), , Repeat .

- . 3.

. 3 -

 

3. N>10. .

.

While ( ) Repeat ( )
1. , ,
2. , ,
3. ( True) 3. ( False)
4. , ( False) 4. , ( True)
5. , False 5.
6. , 6. ,
( ) For
,
goto Break Continue
, ,

, . , ( 12 - ), ( 30 - ), ( 24 - ), ( 60 - ) .. ? . .

, , . . .

. , 0 , 0 , 0 . 1 , 0 59. 1 , 0 59. , :

For h:=0 to 23 do
For m:=0 to 59 do
For s:=0 to 59 do
Writeln(h,:,m,:,s);

: , . , , . : .

, : , .. , .





:


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


:

:

, .
==> ...

1409 - | 1221 -


© 2015-2024 lektsii.org - -

: 0.024 .