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

  • Published on
    23-Dec-2015

  • View
    214

  • Download
    2

Embed Size (px)

DESCRIPTION

fs

Transcript

<p>14</p> <p>14. : , .</p> <p> , , . . </p> <p> , . , . </p> <p> , , . , ( ""), , ( ""). </p> <p> , , . .</p> <p> ( )</p> <p>: </p> <p>for := to do </p> <p>for := downto do for , do, 1 2. </p> <p> , . to, 1 . downto, 1 . .</p> <p> , , do, , , ( begin ... end). </p> <p> 2. . </p> <p>for ch:='A' to 'Z' do Writeln(ch);</p> <p> 3. downto. </p> <p>for i:=10 downto 1 do WriteLn(i);</p> <p> 4. . </p> <p>for x:=1 to 10 do begin</p> <p> y:=2*x+3;</p> <p> WriteLn('f(',x,')=',y);</p> <p> end;</p> <p>: </p> <p>while do do , (True). . , , . (False), , while. </p> <p> , (False), .</p> <p>. </p> <p>eps:=0.001;</p> <p>while x &gt; eps do x:=x/2;</p> <p>: </p> <p>repeat</p> <p> ; ; ... until repeat until , (False). (True), . </p> <p> , .</p> <p>. </p> <p>repeat</p> <p> WriteLn(' ');</p> <p> ReadLn(x);</p> <p>until x&gt;0;</p>

Recommended

View more >