 .    
 


     , -    10 ,    - BeeGeek,       ACM ICPC.       .        ,      ,         -.      .





 

 .    



 



 !

   .  , -    10 .     (, Mail.ru).       .  ,     .

   :

    - BeeGeek.

   IT  Samsung

        ACM ICPC

     

  VK FELLOWSHIP 2020

        

   25      

 .    

  :

: iodzeranov@mail.ru

Telegram: (t.me/JosefDzeranov).

   

     ,       .

              IT-;           .

   

      .

      ,      .

  ,                    .

         ,      .



       ,    ,      ,     .

                .         ,    .

  ,          .

      ,     ,      .

    ,        .

!

  C#



    ,        .    "",  :

       

             

 ,    

   

    

 

        

    

        

   .

   :

1. https://t.me/csharp_publics       

2. https://t.me/csharp_discussions        ,      .

  

     

    

      

    ,    , 

    .

      (   )    (   ,        ).  .     .

  , , ,   !

 !




1.

 



      .   :    ,         ().

   6 :

1.  . ;

2.  ;

3.  ;

4.   ;

5. ;

6. .

 ,     .  ,      ,     .

     ,    :    .      ,       .

,    :

      .

    ,        .       .        .

          C#,  -    ,   -.

    ,         ,     .          .

  !




1.3






  ?

-,  .

-,       .

-,           .

  ?

        .       .       ,       .              .

  ?

        ,     ,         .

 

     C#,  ,   ,        .    C#    ,       -.      :       -  -,    .

 

        ,         ,       .          C#,    ,     .

  ?

   ,               .      .




1.4




 

        .    .

    ,   .  ,    ,   ,       ,   .

  ,     .

  

     :

1.      ;

2.      ;

3.    ,   ;

4.     ;

5.         .

     .     .        ,      .    ,     .

       .           .

 

  (IDE)   ,  (    "")    ( ).   ,       , , ,      . IDE      ,     .         .

   C#     Visual Studio.

 Visual Studio

       Community Edition.      .

    ,        "   .Net".

 ,    .       .

 

 Visual Studio    :








     :








          (  ),        (  )   "":








 

Visual Studio    :








   :

using System;

namespace HelloWorld

{

class Program

{

static void Main(string[] args)

{

//     

}

}

}

    ,     .

   , ,    .      using.   ,      ,    ,      .      System,          .

   ,    .

static void Main(string[] args)

{

//     

}

Main      ,       . -      ,        Main.        .        .               .

     .    //,          .      .     .           .

Hello, World!

            ,      Hello, World!:

using System;

namespace HelloWorld

{

class Program

{

static void Main(string[] args)

{

Console.Write("Hello, World!");

}

}

}

    :

Console.Write("Hello, World!");

onsole   ,    .     ,     .  Write     . Console Write    .

            .       (;) ,      .       C#     (;).










 :

   ,

   ,

    .



 

   .      CTRL  F5.     ,   ,    .       .   ,        "Hello, World!":








  ,    .




2.

 . 





2.1




- .  

Console.WriteLine

  ,        Console.Write().     Console.WriteLine().     ,

          .

     .

static void Main(string[] args)

{

Console.Write("Hello"); // 

Console.Write("World!"); // 

}

 :

HelloWorld!

  ,   

Console.Write("Hello");

       .       "World!".      .










:

//   .  , 

     .   ,        .



   Console.WriteLine():

static void Main(string[] args)

{

Console.WriteLine("Hello"); //      

Console.WriteLine("World!"); //      

}

  :

Hello

World!

  ,   

Console.WriteLine("Hello");

    .       "World!".

 

          . :

static void Main(string[] args)

{

Console.WriteLine(26);

Console.WriteLine(1024 + 48); // 1072

Console.WriteLine(5 + 8 * 2); // 21

Console.Write((5 + 8) * 2); // 26

}

 //  ,     .     :

26

1072

21

26

   ,      .           :  ,    .

 

        .        .         .

       (   ""  ),         (+),       ,    .     .

    :

static void Main(string[] args)

{

Console.WriteLine("5 + 7 = " +12); // 5 + 7 = 12

Console.WriteLine(5 + " + " +7 + " = " +12); // 5 + 7 = 12

Console.WriteLine(3 + " " +6); //     ,   3 6

}

,   (" ")    ,   .  ,           .

,       ,       ,   .

:

1. ,         Console.Write()  Console.WriteLine(),    .

2.  ,         ,      ,   ,    C#     .

3. ,         (;).  .    C#.

4.  Console.WriteLine()     (  )     . :

Console.WriteLine(" 1");

Console.WriteLine();

Console.WriteLine(" 3");

    ,    :

 1

 3

, !

      .

 ,   :

,

!

,    .

:

1.  ,     Console.WriteLine()   ,    .

2.        .     C#.       ,   /.

3. ,       C#,     :








4. C# .     ,    .

5.           (;).

          .    .  ,      ,     .

   :   , ,       .          .

:    .




2.2








,          ,    .            .

      .     .    ,       .

        :      , ,         .  ,      ,      .     ,       .










:

    

  ,

 .



  

        :

_  ;

 ,     ,  int. ,   ,     ,  :

int a;

      a  ,      .         .

     ,    :

 = 



 :    

 =:  

 :   

  . ,      a  7:

a = 7;

       7     a.

    ,            (),      :

int a = 7;

   a     7.

    :       !

   ,      . :

int b = a * 5;

  b   35,     a   ,   7. ,        (a * 5),         b.

        a:

a = a + 8;

        =, ,     ,   7,    8      .  ,     8.










:

   ,   ,    .    ,    .      .



      :

int a = 6; //   a

int b = a * 8; // 48

int a = b  8; // .  a  .

int c = b + a;

Console.WriteLine(c);

   :

int a = 6;

int b = a * 8; // 48

a = b  8; // 40. ,   

  

int c = b + a; // 88

Console.WriteLine(c); //  88

 

,          int.       .       :

 int     -2147483648  2147483647;

 long     9 223 372 036 854 775 808

 9 223 372 036 854 775 807;

 string  ;

 double      ( );

 char  ;

 bool   ,    : true  false.

 :

     name      "". ,      :

string name = "";

       age      2525:

 string name = "";

int age = 25;

       weight      80.5:

 string name = "";

 int age = 25;

 double weight = 80.5;

 ,           .

              :

 string name = "";

 int age = 25;

 double weight = 80.5;

 string stringToShow = name + ",  " +age + ",  " +weight;

Console.WriteLine(stringToShow);

      .    .          .    :

,  25,  80,5










:

C#   

.   

,   

  .



 .         :

int a = 10;

         :

int a = "10"; // !

  , ,    .      :

string s = "test"; // 

string t = 10; // !










:

   

  

 .



,     (+)    ,

         :

int a = 5;

int b = 10;

Console.WriteLine(a + b); // 15

string s1 = "5";

string s2 = "10";

Console.WriteLine(s1 + s2); // 510

 

1.        a-z, A-Z,      (_);

2.       ;

3.        .    , ,    .   ,     .










:



#   .

 name  Name    

.    

  .



:

1.       (     ).

2.     .       ,   ,       .

3.  .     .  ,        :

int a = 6; //  a  6

int b = a * 8;

a = b  8; // 40.   a  40

int c = b + a;

Console.WriteLine(c);

1.       :

int a = 22 * 4 + 1; // 89

int b = a  15 * 3; // 44

2. ,        Main.




2.3




 

 



      ,      .      ,      .

:

Console.WriteLine("!   ?");

string name = "";

Console.WriteLine(", " +name);

       :

!   ?

, 

  ,    .   ,        .  ,     ,        .  ,      ,    .



     C#   Console.ReadLine().  :

Console.WriteLine("!   ?");

string name = Console.ReadLine(); //    .    "name"

Console.WriteLine(", " +name); //  .     ,      .

      !   ?.        .       Console.ReadLine().

  :     ,   Console.ReadLine(),  ,       (    Enter).       Console.ReadLine().

 ,     ,     ,     Console.ReadLine()   .     ,     ,     Console.ReadLine()   .      ,   .










:



Console.ReadLine()    -     (string)      name.



 ,    Console.ReadLine() ,     .     ,     . : Console.WriteLine("!   ?");

Console.ReadLine();

       .       . ,    ?   .

      : Console.WriteLine("!   ?");

string name = Console.ReadLine();

             name.

  ,    n ,   Console.ReadLine()     n .

,    3 ,     :

string row1 = Console.ReadLine();

string row2 = Console.ReadLine();




  .


   .

   ,     (https://www.litres.ru/pages/biblio_book/?art=68952120)  .

      Visa, MasterCard, Maestro,    ,   ,     ,  PayPal, WebMoney, ., QIWI ,       .


