14. Операторы Циклов в Паскале

  • Published on
    23-Dec-2015

  • View
    214

  • Download
    2

Embed Size (px)

DESCRIPTION

fs

Transcript

14

14. : , .

, , . .

, . , .

, , . , ( ""), , ( "").

, , . .

( )

:

for := to do

for := downto do for , do, 1 2.

, . to, 1 . downto, 1 . .

, , do, , , ( begin ... end).

2. .

for ch:='A' to 'Z' do Writeln(ch);

3. downto.

for i:=10 downto 1 do WriteLn(i);

4. .

for x:=1 to 10 do begin

y:=2*x+3;

WriteLn('f(',x,')=',y);

end;

:

while do do , (True). . , , . (False), , while.

, (False), .

.

eps:=0.001;

while x > eps do x:=x/2;

:

repeat

; ; ... until repeat until , (False). (True), .

, .

.

repeat

WriteLn(' ');

ReadLn(x);

until x>0;

Recommended

View more >