Mido
RCTalk Talkaholic
Alright, so i just started computer programming class and its cool so far!
I'm trying to create a program that, simulates rolling a pair of dice 100 times. Have the program print out the number of times the sum of the dice equaled each number from 2 to 12.
So I'm guessing i need to create a loop, that inside has
dice1 = Int(3 * Rnd()) + 4
dice2 = Int(3 * Rnd()) + 4
But I'm not too sure how this works. Imr eally confused on how to do these things
If someone could help me out that would be great. Just remember I'm a newbie so i dont know any of the fancy stuff, just BASICS!
thanks all
I'm trying to create a program that, simulates rolling a pair of dice 100 times. Have the program print out the number of times the sum of the dice equaled each number from 2 to 12.
So I'm guessing i need to create a loop, that inside has
dice1 = Int(3 * Rnd()) + 4
dice2 = Int(3 * Rnd()) + 4
But I'm not too sure how this works. Imr eally confused on how to do these things
If someone could help me out that would be great. Just remember I'm a newbie so i dont know any of the fancy stuff, just BASICS!
thanks all