QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.





🐝 Tom Sales


Copyright (C) 1994-95 DOS Resource Guide/DOS World 
Published in Issue #17, September 1994, page 66 and 
              Issue #20, March 1995, page 64 
It takes clever programming indeed to create an 
interesting one-line program. You'll be amazed at 
how much can be accomplished. 

DIE_ODDS.BAS simulates the results of tossing two dice, dropping "rocks" in  
ever-growing piles to illustrate the outcome visually. If you toss two dice,  
the odds are greatest that you'll throw a total of seven; a sum of 2 or 12 is  
the least likely to turn up. In the program's on-screen display, the left  
column indicates the number of times the value of a roll will equal 2, the  
next column shows the number of times it will equal 3, and so on. Piles of  
equal color represent totals with the same odds.


Please note that QBjs is still in early development and support for these examples is extremely experimental (meaning will most likely not work). With that out of the way, give it a try!


🔗 statistics, dos world, 254 chars