Run »
dice <- 1 while (dice <= 6) { if (dice < 6) { print("No Yahtzee") } else { print("Yahtzee!") } dice <- dice + 1 }
[1] "No Yahtzee"
[1] "No Yahtzee"
[1] "No Yahtzee"
[1] "No Yahtzee"
[1] "No Yahtzee"
[1] "Yahtzee!"