Ejercicio 1: Programa que pide el nombre del usuario y muestra en pantalla un saludo usando el nombre ingresado.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace nombre
{
class Program
{
static void Main(string[] args)
{
var nombre = args.SingleOrDefault();
if (nombre== null)
{
Console.WriteLine("Escribe tu nombre y presione enter al finalizar");
nombre = Console.ReadLine();
}
Console.WriteLine("Hola mundo "+nombre);
Console.ReadKey();
}
}
}
No hay comentarios:
Publicar un comentario