/* C for C # demo  version 2, this time has methods  */


/* you can copy and paste the C# code into https://www.onlinegdb.com/online_csharp_compiler */


using System;

class HelloWorld {

  static int timesten(int myint) 
  {
   myint = myint * 10;
   return myint;
  }

  static void completed() 
  {
  int shownum = timesten (2);
  Console.WriteLine("Completed!" + shownum);
  }

  static void Main() {
    int a = 1;
    int b = 5;
    int cc = 0;
    int dd; 
    string[ ] nickname = {"John","Peter","Karl","Alex","Carson","Kay","Suze"}; 
    
    
    while (cc < b)
     {
        cc = cc + a;
        
        if (cc != 2) 
        {
            Console.Write("Hey world! Integer value is ");
            Console.WriteLine(cc);
        }
            else 
            Console.WriteLine("I was told to show something different when cc is 2");
            
     }
    
   for (dd = 0; dd < b*2; dd++)
      {
            
            switch (dd) 
            {

            case 3: 
            Console.Write("Hello world! SPECIAL: " + nickname[dd] );
            break;

            case 5: 
            Console.Write("Hello world! SPECIAL AGAIN: " + nickname[dd] );
            break;

            default:
            Console.Write("Hello world! Doing this again: ");
            break;
                    
            }             
          
            Console.WriteLine(dd);

      } 

   completed ();
}
}


