online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int larger (int arr[], int dim){ int mayor=0; for(int i=0; i<dim; i++) if (arr[mayor] < arr[i]) mayor= i; return mayor; } int main(){ int myArr[] = {100, 20, 300, 40, 50, 66, 12, 10, 5, 200}; int dimension=10; int mayor; mayor = larger(myArr, dimension); cout<<"El mayor elemento del arreglo es: "<<myArr[mayor]<<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