i keep putting in print(count) for a code, but im not getting any answers back. there are no numbers. this is the code im using

count = 0
for (i in 1:10000){
diceRoll = sample(1:6,2,replace = TRUE)

if ( diceRoll[1]+diceRoll[2] < 6){
count = count + 1

Prints just fine when I run your code. Maybe you can give us a little more context?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.