.


:




:

































 

 

 

 


. , .




, .

while , , , while, . : , , . , . :

while () ; while () { }

.

:

const n=25;

int i=0;

while (i<n) i++;

, : , () . for, .

for , . ;. . - ( ), . -. for - , , . ³ :

for (; _; _)

_ , . , ;

_ _.

:

int i;

for (i=0; i<n; i++) cout<<i;

ҳ , - ( ).

_ , .

:

for (;;); //

for (;1;); //

( ). ` . do while. :

do while ();

:

do

{ ch=getchar();

putchar(ch);

} while (ch!=`\n`);

, .

 

1. (s=0) (i=0).

2. , 4, 3.

3. . (++), 2.

4. ʳ

:

int s, i;

s=0;

for (i=0; i<20; i++) s+=i;





:


: 2017-02-25; !; : 336 |


:

:

, , 1:10
==> ...

1877 - | 1783 -


© 2015-2024 lektsii.org - -

: 0.008 .