online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <string> using namespace std; const int n = 3; const int m = 4; int func(int val[n][m]) { int res = 0; if(n>0 && m>0){ if(n == m){ for (int i=0; i<n; i++){ res = val[i][i] * func( val[i-1][i-1] ); } }else{ for (int j=0; j<m; j++){ res = val[1][j] + func( val[1][j-1] ); } } } return res; } int main() { int n, m; /* cout<<"Introduzca el numero de filas y columnas respectivamente: "<<endl; cin>>n>>m; */ int M[n][m]; func(M); 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