4
4
4
4
4
4
4
4
4
4
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- public static int diceRoller(int x, int y)
- {
- Random rnd = new Random();
- int result = rnd.Next(x, y+1);
- return result;
- }
- static void Main(string[] args)
- {
- int[] myArray = new int[10];
- for (int i = 0; i < myArray.Length; i++)
- {
- myArray[i] = diceRoller(1, 6);
- Console.WriteLine(myArray[i]);
- }
- Console.ReadKey();
- }
- }
- }
Marz NovaPosted Feb 2, 2018, 2:07 PM