online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; // declaración de la función: double getAverage(int *arr, int size); int main () { int balance[5] = {1000, 2, 3, 17, 50}; double avg; // Pasar el puntero a un arreglo como parámetro. avg = getAverage(balance, 5) ; //Imprimir el valor retornado del promedio cout<<"El Valor Promedio es : "<<avg<<endl; return 0; } double getAverage(int *arr, int size) { int sum = 0; double avg; for (int i=0; i<size; ++i) { sum += arr[i]; } avg = double(sum)/size; return avg; }

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