.


:




:

































 

 

 

 





, . ++ .

:

. .

, , , .

:

i++; //

a*=b + c; //

. . , , - .

, , .

: ( ).

, , , .

. , ( ). .

, , - .

:

{

n++;

summa+=(float)n;

}

:

{

int n=0;

n++;

summa+=(float)n;

}

( , ), , .

. .

1.8

 

if

if .

: if () _1; [else _2;]

1.4.

, . ( true), , . , . else . .

- , , , . , , . , , , .

 

1.4 -

:

if (a < 0) b = 1; // 1

if (a < b && (a>d || a = = 0)) b++; else {b *= a; a = 0;} // 2

if (a < b) {if (a < c) m = a; else m = c;} else {if (b < c) m = b; else m = c;} // 3

if (a++) b++; // 4

if (b > a) max = b; else max = a; // 5

1 else - , .

, . , 2 , a < b . , , .

3 . , else if.

4 , if , .

, 5, ( : max = (b > )? b: a;).

(= =) (=), , if (a = 1) b = 0;. , (true false, int), / . b . : if (1= = a) b=0;.

. , 0 < < 1, , 0 < x, x (true false, int) 1. : if(0 < && < 1).

- , , : if (int i = fun(t)) a -= i; else a += i;. if . . , .

: , 1.5. .

1.5 -

 

#include <iostream.h>

int main(){

float x, ; int kol;

cout << " \n";

cin >> x >> ;

if (x*x + y*y < 1) kol = 2;

else if (x*x + y*y < 4) kol = 1;

else kol =0;

cout << "\n : " << kol;

return 0;

}

, , if.

#include <iostream.h>

int main(){

float x, y, temp; int kol;

cout << " \n";

cin >> x >> ;

temp = x*x + y*y;

kol = 0;

if (temp < 4) kol = 1;

if (temp < 1) kol = 2;

cout << "\n : " << kol;

return 0;

}

kol , .





:


: 2016-11-12; !; : 1676 |


:

:

, , .
==> ...

1589 - | 1261 -


© 2015-2024 lektsii.org - -

: 0.012 .