You can use the usual well known
rand()[
^] function or the more advanced pseudo-
random generator[
^] of
C++
to simulate (independly) the throw of the dice
s.
Then by means a very great number of throws, give an estimate of the requestd probability (additionally you may compare such an estimate with the theorical expected value).
[update]
Fixed my bad English, thanks to
Richard.
[/update]