.


:




:

































 

 

 

 


7.




:

<> = <>;

. ( ), .. , , , . T1 T2 ( , , T1=T2), :

T1 T2 , , .

T1 T2 , T2 T1.

T1 T2 , T2 T1.

T1 , T2 .

T1 T2 .

T1 , T2 (Char).

T1 T2 , T2 T1.

T1 T2 .

T1 T2 .

T1 , T2 , .

, , .

{ <> }

, . , , .

Goto

goto <>;

- , . goto , , , . , goto. .

If

: ( ) ( ).

if :

if (<>) <1> [else <2>];

. , . True (), 1. False, else ( ), , if. 2.

, if else if, else.

if.

if (A!= B) Z = X+Y;

else Z = 1;

if (P1 = null)

{

P1 = Pl^.next;

if (a > 0)

{

if (b > 0)

{

if (c > 0) d = a*b*c;

else

if (d < 0)

{

d = SQRT(a*b*c);

c = c*b;

}

else d = SQR(d);

}

else d = a*b;

else d = a;

}

 

15. if - (.31).

float a,b,c,z; /* */

float x1,x2; /* */

 

printf("\n :\n");

scanf("%f",&a);

printf(" b:\n");

scanf("%f",&b);

printf(" :\n");

scanf("%f",&c);

 

z=b*b-4*a*c; /*Z-*/

 

if(z>=0.0)

{

x1=(-b+sqrt(z))/2/a;

x2=(-b-sqrt(z))/2/a;

 

printf("\n :x1=%f,\nx2=%f",x1,x2);

}

else

printf("\n .");

 

switch

swith (), , .

switch ()

{

case _1: _1; [break;]

case _2: _2; [break;]

...

case _n: _n; [break;]

 

[default: ; [break;]]

}

 

int. case . .

swith . , , . default, , . default , .

case default , . break.

16. : swith months, .

// switch

switch (months)

{

case 1: season = ; break;

case 2: season = ; break;

case 12: season = ; break;

case 3: season = ; break;

case 4: season = ; break;

case 5: season = ; break;

case 6: season = ; break;

case 7: season = ; break;

case 8: season = ; break;

default: season = ; break;

}

// if

if (months==1 || months==2 || months==12) season = "";

else

if (months==3 || months==4 || months==5) season = "";

else

if (months==6 || months==7 || months==8) season = "";

else season = "";

 

- (.32):





:


: 2016-10-22; !; : 1054 |


:

:

, ,
==> ...

1276 - | 1255 -


© 2015-2024 lektsii.org - -

: 0.02 .