Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 7, 2022 02:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/5aa1f6eabfff385bfba001fc41c863e8 to your computer and use it in GitHub Desktop.
Save parzibyte/5aa1f6eabfff385bfba001fc41c863e8 to your computer and use it in GitHub Desktop.
using System;
namespace PrimerCentralYÚltimoElemento
{
class Program
{
static void Main(string[] args)
{
// https://parzibyte.me/blog
string[] nombres = { "Luis", "Link", "Ethan", "King K. Rool", "Parzibyte" };
string primero = nombres[0];
string central = nombres[nombres.Length / 2];
string ultimo = nombres[nombres.Length - 1];
Console.WriteLine("Primero: {0}", primero);
Console.WriteLine("Central: {0}", central);
Console.WriteLine("Último: {0}", ultimo);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment