Created
September 16, 2017 01:00
-
-
Save mujeebishaque/b9f90e585002a9217aa9e7520ad5a45a 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
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