online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> int FindFinbonacciValue(int num) { int d = 0; int a = 1, b = 2, c = 4; if (num == 1) return 1; if (num == 2) return b; if (num == 3) return c; //std::cout << "\n" << a << std::endl; //std::cout << b << "\n" << c << std::endl; for (int i = 4; i <= num; i++) { d = a + b + c; a = b; b = c; c = d; //std::cout <<" " << d << std::endl; } return c; } int main() { int num = 6; int res = FindFinbonacciValue(num); std::cout << res; 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