Small C# Project

I don't have any C# experience, but I think this is exactly what you're asking for. I wrote this program in python and it simulates two dice being thrown. You enter a number for how many times you want to throw the dice and it shows you how many times each number appeared after it does it real time.... anyway.... perhaps it can help.

#DiceRollSample

Takes a Sample from any amount of dice rolls using randint

Author: Rudy

Date: 9/23/2015

from random import randint

global variables

rolls = 0 two = 0 three = 0 four = 0 five = 0 six = 0 seven = 0 eight = 0 nine = 0 ten = 0 eleven = 0 twelve = 0

input decides roll sample

max_rolls = int(input("How many times would you like to roll the dice: "))

While loop for rolls

while rolls < max_rolls: # <--- corresponds with input to determine roll sample die1 = randint(1, 6) die2 = randint(1, 6) roll = die1 + die2

print ("Roll =", roll)

if roll == 2:
    two += 1
elif roll == 3:
    three += 1
elif roll == 4:
    four += 1
elif roll == 5:
    five += 1        
elif roll == 6:
    six += 1
elif roll == 7:
    seven += 1
elif roll == 8:
    eight += 1
elif roll == 9:
    nine += 1
elif roll == 10:
    ten += 1
elif roll == 11:
    eleven += 1
elif roll == 12:
    twelve += 1

rolls += 1

print ("\nTotal Rolls =", rolls, "\n")

print ("Twos rolled =", two) print ("Threes rolled =", three) print ("Fours rolled =", four) print ("Fives rolled =", five) print ("Sixes rolled =", six) print ("SEVENs rolled =", seven) print ("Eights rolled =", eight) print ("Nines rolled =", nine) print ("Tens rolled =", ten) print ("Elevens rolled =", eleven) print ("Twelves rolled =", twelve)

input ("\nPress any key to exit")

/r/learnprogramming Thread