online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# MINES CALCULATOR FOR BC.GAME # # Just click run up top and type in the number of mines and diamonds below to see payout. # Contact DASH if you have any issues with this script. import math def nCr(n,r): f = math.factorial return f(n) // f(r) // f(n-r) def calc(mines, diamonds): edge = 0.01 return (1 - edge) * nCr(25, diamonds) / nCr(25 - mines, diamonds) while True: mines = int(input("How many mines? ")) diamonds = int(input("How many diamonds? ")) multiplier = calc(mines, diamonds) print("Multiplier is {0:.2f}".format(multiplier)) print("\n")

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



Program is not being debugged. Click "Debug" button to start program in debug mode.