online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int hailstone (int n) { if(n == 1){ return 1; }else if(n%2 != 0) { n = 3*n + 1; cout<<n<<", "; }else{ n = n/2; if(n!=1) cout<<n<<", "; } return hailstone(n); } int main() { int N; cout<<"Escriba un número: "; cin>>N; cout<<hailstone(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