A89: True/False -> 1/0???


[Prev][Next][Index][Thread]

A89: True/False -> 1/0???



Is there an efficient and fast way to interpret "True"s and "False"s to be
1's and 0's, respecively?  On the TI-85, "True" and "False" were
automatically interpreted as simply "non-zero" and "zero", and that was
pretty handy a lot of times...  What I'm trying to do is execute something to
the effect of:

sum(seq(int(10*rand())>4,n,1,10))

...to count how many out of 10 random digits are greater than 4 (just as an
example).  Any ideas to solve this general problem?

JayEll

Follow-Ups: