online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <locale.h> #include <iostream> #include <locale> using namespace std; int main() { setlocale(LC_ALL, "Portuguese"); cout << "Cálculo a média de valores inseridos e terminar com 0. \n\n"; int contador=0, num, media, soma=0; while (num !=0){ cout << "Inserir número: "; cin >> num; soma += num; contador++; } media = soma/(contador-1); //removemos o valor Zero lido cout << "A média é " << media; 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