Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
518 B
3
Indexable
Never
Roll roll6 = new Roll();
roll6.rollSixDice();


public class Roll
{
    Random random = new Random();
    public static int[] sixDice = new int[7];

    public void rollSixDice()
    {        
        for (int i = 1; i < 21; i++)
        {
            int j = random.Next(1, 7); //roll
            sixDice[j]++; //store
        }

        for (int k = 1; k < sixDice.Length; k++)
        {
            Console.WriteLine(k + ": " + sixDice[k]); //display
        }
    }
}

class Store
{
    
    
}

class Display
{

}