Skip to content

Instantly share code, notes, and snippets.

@mujeebishaque
Created September 16, 2017 01:00
Show Gist options
  • Save mujeebishaque/b9f90e585002a9217aa9e7520ad5a45a to your computer and use it in GitHub Desktop.
Save mujeebishaque/b9f90e585002a9217aa9e7520ad5a45a to your computer and use it in GitHub Desktop.
public static void Main(string[] args)
{
int initPoint = 96;
var storeRandom = new List<int>();
Random rand = new Random();
while (initPoint++ <= 122)
{
storeRandom.Add(GenerateRandomNumber(rand));
}
showRandomNumbersList(storeRandom);
ReadKey();
}
public static int GenerateRandomNumber(Random rand)
{
return rand.Next(97, 122);
}
public static void showRandomNumbersList(List<int> storeRandom)
{
foreach (var number in storeRandom)
{
WriteLine(number);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment