.


:




:

































 

 

 

 


New sizeof typeof unchecked




 

()

 

()

 

j

 

(

 

+ ()

 

- ()

 

++

 

--

 

)

 

() )

 

★

 

/

 

 

+

 

-

 

 

 

<

 

>

1 =

 

<=

 

>=

 

Is

 

&

 

&&

1 I

 

1 1 ??

 

? :

 

=

 

=

 

=>

 

 

 

5

, #. : , if switch, , for, while, do-while foreach, : break, continue, goto, return throw. throw, C# , 13, .

if

i f 2, . :

if () ; else ;

, if else. else . , if else, . i f, .

if ()

{

Else

{

}

, if. else, . . , if, bool.

, if else , , .

// , .

Using System;

class PosNeg {

static void Main() { int i;

for(i=-5; i <= 5; i++) {

Console.Write(" " + i + ": ");

if(i < 0) Console.WriteLine(" "); else Console.WriteLine(" ");

}

}

}

.

 

 

-5

 

 

 

 

-4

 

 

 

 

-3

 

 

 

 

-2

 

 

 

 

-1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

i , if. else, .

if

if, if else. if . #, , else if, ..

if, , else, else. .

if (i == ) {

if (j < 20) -a = b; if(k > 100) = d;

else a = ; // else if(k > 100)

}

else a = d; // else if(i == 10)

, else if (j < 20), , , if else. , else if (i == 10). else i f (k > 100), i f .

if. . , , , . , , .

// , // , .

Using System;

class PosNegZero { static void Main() { int i;

for(i=-5; i <= 5; i++) {

Console.Write(" " + i + ": "); if(i < 0) Console.WriteLine(" "); else if(i == 0) Console.WriteLine(" "); else Console.WriteLine(" ");

}

}

}





:


: 2016-12-03; !; : 373 |


:

:

- - , .
==> ...

1725 - | 1670 -


© 2015-2024 lektsii.org - -

: 0.015 .