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)));
static void Main(string[] args) { string igredient = "ofca"; while (igredient != "Bake!") { ingredient = Console.ReadLine(); Consle.WriteLine($"Adding ingredient {ingredient}."); } }
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(); }
//The following statements declare public methods public void MakeCappuccino() { Consle.WriteLine("Cappuccino is made."); }
public void Migra() { Consle.WriteLine("É inverno, as aves estão migrando para o Sul"); }