-
-
Save parzibyte/9f90952f67bc82e151b754748ad421cb to your computer and use it in GitHub Desktop.
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
/* | |
https://parzibyte.me/blog | |
*/ | |
using System; | |
class MainClass | |
{ | |
public static void Main(string[] args) | |
{ | |
int numeroEntre10Y20 = aleatorioEnRango(10, 20); | |
Console.WriteLine($"Número entre 10 y 20: {numeroEntre10Y20}"); | |
} | |
static int aleatorioEnRango(int minimo, int maximo) | |
{ | |
System.Random rnd = new System.Random(); | |
return rnd.Next(minimo, maximo + 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment