Advertisement
fuwa-sensei

dice in C#

Jun 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp3
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. Random rnd = new Random();
  10. {
  11. int d4 = rnd.Next(1, 5);
  12. int d6 = rnd.Next(1, 7);
  13. int d8 = rnd.Next(1, 9);
  14. int d10 = rnd.Next(1, 11);
  15. int d12 = rnd.Next(1, 13);
  16. int d20 = rnd.Next(1, 21);
  17. int d100 = rnd.Next(1, 101);
  18. Console.WriteLine($"{d4},{d6},{d8},{d10},{d12},{d20},{d100}");
  19. Console.ReadKey();
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement