Advertisement
NedyalkoKikov

RandomNumbers

May 19th, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace RandomNumbers
  8. {
  9. class RandomNumbers
  10. {
  11. static void Main()
  12. {
  13. Random numb = new Random();
  14. List<int> randNums = new List<int>();
  15. for (int i = 0; i < 20; i++)
  16. {
  17. randNums.Add(numb.Next(1, 10));
  18. }
  19. Console.WriteLine(string.Join(", ",randNums));
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement