online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# ************* Dati di input ************* V1 = 12.3934 # Volume occupato dal liquido R = 1 # Raggio L = 5 # Lunghezza # ***************************************** import math def alfa1(x): return -0.0072+0.3558*math.sqrt(x)+0.5093*x def alfa2(x): return 0.4979-0.3558*math.sqrt(1-x)+0.5093*x def volserb(R,L): return math.pi*R**2*L V = volserb(R,L) print("Volume serbatoio:",V) print("Volume liquido considerato:",V1) gamma = V1/V print("Gamma:",gamma) if gamma==0: h1 = R print("Altezza stimata:",h1) elif gamma < 0.5: alfa = alfa1(gamma) h1 = 2*alfa*R print("Altezza stimata:",h1) elif gamma > 0.5: alfa = alfa2(gamma) h1 = 2*alfa*R print("Altezza stimata:",h1) # *********** Verifica ******** h2 = h1 # Altezza liquido a = math.acos(1-h2/R) V2 = L*(a*R**2-(R-h2)*math.sqrt(2*R*h2-h2**2)) print("Volume liquido 2:",V2)

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

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

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue