.


:




:

































 

 

 

 


; break;




}

( ), int. char string.

case : ; break;

, . . , .

switch:

1. .

2. , , . , . break switch. , default ( ), .

default switch . , , switch.

switch . , ( default), :

switch() { }

.

1. .

:

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine(" :");

int n = int.Parse(Console.ReadLine());

switch(n)

{

case 1:

Console.WriteLine("");

break;

case 2:

Console.WriteLine("");

break;

case 3:

Console.WriteLine("");

break;

case 4:

Console.WriteLine("");

break;

case 5:

Console.WriteLine("");

break;

case 6:

Console.WriteLine("");

break;

case 7:

Console.WriteLine("");

break;

default:

Console.WriteLine(" : {0}", n);

break;

}

Console.Write("Press any key to continue... ");

Console.ReadKey(true);

 

}

}

}

goto

. , . :

Goto Metka;

//

//...............

Metka:;

Metka (), , . ( !), , .

C# . goto . , , .

1. A, B, C , .

2. , , . .

3. A, B, C. , .

4. A B , .

5. =2+b+.

6. , R A.

7. , S N- ( ).

8. , .

9. , , : , , .

10. , : 1 \, , ( ).

11. , , : , 1 .

12. , ( , ).

13. , , : ; , .

14. , , : , .

15. , : ( ), .

16. , , : , , .

17. , : ; .

18. y= 2++.

19. , .

20. A, B, C , .

(. 1.10)

1. , if.

2. .

3. switch.. case if?

4. switch.. case?

5. .

6. ?

7. ?

8. ?

9. ?

10. Watch?





:


: 2015-10-19; !; : 564 |


:

:

,
==> ...

1969 - | 1883 -


© 2015-2024 lektsii.org - -

: 0.015 .