Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active February 2, 2021 03:23
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/9f90952f67bc82e151b754748ad421cb to your computer and use it in GitHub Desktop.
Save parzibyte/9f90952f67bc82e151b754748ad421cb to your computer and use it in GitHub Desktop.
/*
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