Example #1
0
 static void Main(string[] args)
 {
     // error handling omitted!
     switch (args[0])
     {
     case "ADD":
         Consle.WriteLine("={0}", ADD(int.Parse(args[1]), int.Parse(args[2)));
Example #2
0
        static void Main(string[] args)
        {
            string igredient = "ofca";

            while (igredient != "Bake!")
            {
                ingredient = Console.ReadLine();
                Consle.WriteLine($"Adding ingredient {ingredient}.");
            }
        }
Example #3
0
    static void Main(string[] args)
    {
        string Mystring = Console.ReadLine();

        if (Mystring.lenght < 7)
        {
            Console.WriteLine0("String is too small");
        }
        else
        {
            int lenght = Mystring.lenght;
            Consle.WriteLine(Mystring.Substring(3));//tword
            Consle.WriteLine(Mystring.Substring(0.lenght - 3));
            Consle.WriteLine(Mystring.Substring(3, lenght - 6));
        }

        Console.ReadLine();
    }
Example #4
0
 //The following statements declare public methods
 public void MakeCappuccino()
 {
     Consle.WriteLine("Cappuccino is made.");
 }
Example #5
0
 public void Migra()
 {
     Consle.WriteLine("É inverno, as aves estão migrando para o Sul");
 }