.


:




:

































 

 

 

 


: if. else, (?:)




: . , : if...else, switch break, goto, (?:).

:

if (_) ;

_ : , . , , (.. ) -_. :

if ( < 0 && > -10) =-:

, :

if (_)

_1;

else

_2;

- _1, - _2. :

if (x > 0)

b =;

Else

b=-;

if, _1 2 if , .

, 2- ax2+bx+c=0 , (b2~4) . 1, 2 :

...............

d=b*b - 4**; /* d - */

if (d>=0.0)

{

xl=(-b+sqrt(d))/2/a;

2=(-b-sqrt(d))/2/;

printf("\n : xl=%e, x2=%e", xl, 2);

}

Else

printf("\n .");

, d, b, a, xl, 2 - ( float double). , b, , . if , else - - printf(). sqrt() . math.h.

():

< , ( 6);,

> , ( 6);

<= ( 6);

>= ( );

== ( 7);

!= ( 7).

. : 0 () 1 (). ( ) . ,

( < == < ) 1,

< , , . ( < <, ==.)

:

&& - () ( 11. 0 () 1 ();

|| - () ( 12). 0 () 1 (). ( '!'.)

:

3<5 1;

3>5 0;

3=5 0;

3!=5 1;

3!=5 || 3=5 1;

3+4>5 && 3+5>4 && 4+5>3 1.

( 13). . '?' ':' -:

_1? _2: _3

_1. , .. , _2, . _1 0, _3. :

< 0? -: ;

.

1 , , , ( ifelse).

2 .

3 , .

4 .

5 , .

 

y = f(x),

ì f1(z), z < 0;

x = í f2(z), 0 £ z £ 8;

î f3(z), z > 8;

z = cos().

15.

 

15 -

. f(x) f1(z) f2(z) f3(z) c
  x2+8x-6 z3-3z2 zln(z) Ez-e-z 5,1
  X3lnx2 e-z+3z ln|z| Cosz+z2 5,4
  X1/4+sinx 2z-ln|z| tgz-2z Sin3z 4,1
  X4+2sinx2 sinz+tgz cos3z+3/z Z2+lnz2 3,2
  Cosx3 z2+2sinz lnz+2z Ez+1/z 4,7
  Sinx+2lnx 2z+tgz lnz4+2z Cosz+2z 1,3
  Sin4x2 sinz2-z3 2sinz2 1,6
  Tgx-4x3 1/cos2z z-ln|z| Z3+sinz 1,5
  Lnx-e2x z2+ez cos4z/z3 Tg(z+1/z) 2,7
  2x-lnx 2cosz+1/z z3-2ln|z| Tg2z+z3 3,8
  3x-sinx 3tg3z 1/cos4z E2z+sinz 1,6
  4x2+cosx 3z/sinz z2+2sinz 2z-ln|z| 2,4
  +cosx z2+lnz2 ez+1/z Z4-sinz 4,1
  x1/3+2x ln|cosz| 2z+ez Tg2z 2,5
  Sin4x+2x z5/sin2z e-2z+tgz Cos4z+z1/3 3,2
  Tg4x+1/x z/sinz1/5 2ztg3z Z +8 1,4
  Ln(1/x) zsin2z-8 lnsinz0,8 -2,5 2,3
  e2x+4x cos(p /4)-z 1/(ez+1) arctg(z+3) 4,1
  Cosx4+x/2 sin(z+30) lncos(pz/6) e-tg(z-2) 3,2
  2tgx+ex z+cos(p +z) z3+z1/3 Z4-lnz 2,8
  2lnx2 arccosz2 sinz+lncosz Z3-sin(p x) 1,7
  Cos2x/3 z2+ln(z+4) e(z-5)+sinz 2,2
  1/tgx4 e-4z+2+z2 cos(z1/3+2) Sin(p +4z2) 5,6
  e2x-x3 tg(z2+ ) ln(sinz+5) Z4+z2-cosz 3,4
  Tgx-2lnx arcsin(z+3) z3-z2+cosz Ln(z3+4z) 2,5
  Cosx4+x/2 lnsinz0,8 cos(p /4)-z Z/sinz1/5 3,7
  Ln(x+x2) 2ztg3z sin(p +4z2) Z3+z1/3 2,6
  Cosx4+2x tg(z+1/z) e2z+sinz Cosz1/5 3,8
  Sin4x+2x z2+lnz2 cos3z+3/z Cos(p /4)-z 5,8
  3ln(x2+5) z4-lnz sinz+tgz Sinz+lncosz 3,5

 

1 <> if switch?

2 goto else, case; default:?

3 ifelse, switch?

4 <> switch ?

5 <> switch ?

6 break switch? ? break?

7 if else ¢¢{¢¢ ¢¢}¢¢.

8 (?:)?

9 .

10 ?

 

7





:


: 2016-11-02; !; : 536 |


:

:

, .
==> ...

1665 - | 1532 -


© 2015-2024 lektsii.org - -

: 0.016 .