public static void Main() { Program2 orange = new Program2(); Console.WriteLine(orange.Gematria("universe")); Console.ReadLine(); }
public static async Task Test() { var p = new Program2(); var t1 = p.Method1(); var t2 = p.Method2(); Console.WriteLine($"{t1} {t2}"); var t3 = await p.Method2(); Console.WriteLine(t3); Console.WriteLine("end"); }
static void Main(string[] args) { Program2 p = new Program2(); string[,] tablero = new string[3, 3]; int turno = 0; int casilla = 0; string actual = ""; do { Console.Write("Digite la casilla que desea marcar"); casilla = Convert.ToInt32(Console.ReadLine()); p.ColumnaFila(casilla); if (turno % 2 == 0) { tablero[p.fila, p.columna] = "x"; actual = "X"; } else { tablero[p.fila, p.columna] = "o"; actual = "o"; } if (turno >= 4) { if (p.GanoHorizontal(tablero)) { Console.WriteLine("gano {0}", actual); break; } else if (p.GanoVertical(tablero)) { Console.WriteLine("gano {0}", actual); break; } else if (p.GanoDiagonal(tablero)) { Console.WriteLine("gano {0}", actual); break; } } turno++; if (turno == 9) { Console.WriteLine("EMPATE"); break; } } while (true); }
static void Main(string[] args) { #region Length Input Console.WriteLine("Enter array length"); int a_length; if (int.TryParse(Console.ReadLine(), out a_length)) { ; } else { a_length = 5; } #endregion int[] a = new int[a_length]; #region Array init and input Console.WriteLine("Enter " + a_length + " numbers"); for (int i = 0; i < a_length; i++) { if (int.TryParse(Console.ReadLine(), out a[i])) { ; } else { a[i] = 0; } } #endregion #region Array output Console.WriteLine("Output:"); foreach (int x in a) { Program2 obj = new Program2(x); Console.WriteLine(obj.Addable()); } #endregion Console.ReadKey(); }
static void Main(string[] args) { Program2 ejemplo = new Program2(); ejemplo.mensaje(); }
static void Main(string[] args) { Program2 orange = new Program2(); Console.WriteLine(orange.Gematria("universe")); }