ohh,sorry,I was just thinking I'm taking mathematics exam!!!
I forgot we have a computer and can use it!!!
Code:
a special syntax!!!
int sum:=0;
int pre=:PreviousStep;
For Dice1:=1 to 10
For Dice2:=1 to 10
For Dice3:=1 to 10
if(dice1!=dice2!=dice3) & (dice1+dice2+dice3>=Pre) then sum:=sum+1;
//sum is the naswer
now the
probability is
n(A)/n(S);
n(S)=10*9*8
n(A)=sum
so p(A)=n(A)/n(S)=
sum/10*9*8.
--------------------------------------------
Mehdi.:)