Created
August 1, 2019 15:19
-
-
Save parzibyte/16c7873c4f47c64b66b1d79a50185940 to your computer and use it in GitHub Desktop.
Mayor de edad en C# - https://parzibyte.me/blog/2018/11/19/mayor-menor-de-edad-varios-lenguajes-de-programacion/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Mayor y menor de edad en C# | |
@author parzibyte.me | |
*/ | |
using System; | |
class MayorEdad{ | |
public static void Main(){ | |
int edad; | |
Console.WriteLine("Escribe tu edad: "); | |
edad = Convert.ToInt32(Console.ReadLine()); | |
if (edad >= 18){ | |
Console.WriteLine("Mayor de edad"); | |
}else{ | |
Console.WriteLine("Menor de edad"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment