online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> int a(int n) { return n ? n + a(n - 1) : n; } int b(int n) { auto result{ 0 }; for (auto i{ 0 }; i <= n; ++i) result += i; return result; } int main() { std::cout << a(3) << std::endl; std::cout << b(3) << std::endl; 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