online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/*Lección: 12 Tema: 7 4. Crea un programa en C++ donde el usuario ingrese 10 números, después estos se deben de guardar en un array, para finalmente imprimir su promedio.*/ #include <iostream> using namespace std; int main() { setlocale (LC_CTYPE, "Spanish"); float num[10] = {}, suma = 0, prom = 0; cout << "Ingrese 10 números, por favor:\n"; for (int i = 0; i <= 9; i++) { cout << "#" << i + 1 << ": "; cin >> num[i]; suma += num[i]; } prom = suma / 10; cout << "\n----------------------------------------------------\n\n"; cout << "El promedio de los 10 números ingresados es: " << prom; 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