online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int fibonacci(int n, bool print = true) { int res = 0; if( n > 0 ) { if( n < 2 ) res = 1; else res = fibonacci(n-1,false) + fibonacci(n-2,false); if( print ) { fibonacci(n-1); cout << res << ' '; } } return res; } int main() { fibonacci(5); cout << '\n'; fibonacci(8, false); cout << '\n'; return 0; }

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