online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
# Butterworth Sallen-Key LPF example script # Max Xiang 10/13/2025 import numpy as np def print_butterworth_lowpass_values(order, cutoff_hz, resistance): if order % 2 > 0: print("Cannot have odd orders for Sallen-Key") return delta_angle = np.pi / order # do this in radians here omega_0 = 2 * cutoff_hz * np.pi for i in range(int(order / 2)): angle = (0.5 + i) * delta_angle zeta = np.cos(angle) c1 = 1 / (omega_0 * resistance * zeta) c2 = zeta / (omega_0 * resistance) print(f"Stage {i + 1}: C1 = {c1}, C2 = {c2}, R1 = R2 = {resistance}") print_butterworth_lowpass_values(8, 5000, 10000) # 8th order low pass at 5 kHz, with 10k resistors

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