online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include<iostream> using namespace std; int controlNatal (int adultas, int huevosPorAdulta, int maxNoHuevos, int anios, int huevos = 0, int nacidos = 0, int bebes = 0) { if (anios == 0) { return adultas; } int huevosPuestos = adultas * huevosPorAdulta; if (huevosPuestos > maxNoHuevos) { huevosPuestos = maxNoHuevos; } adultas = adultas + nacidos; nacidos = huevos; bebes = nacidos; huevos = huevosPuestos; return controlNatal (adultas, huevosPorAdulta, maxNoHuevos, anios - 1, huevos, nacidos, bebes); } int main () { int adultas, huevos, maxHuevos, anios; int crecen = 0, maduran = 0; cin >> adultas >> huevos >> maxHuevos >> anios; cout << controlNatal (adultas, huevos, maxHuevos, anios); }

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