online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> //biblioteka wejścia wyjścia using namespace std; int n; //liczba ocen int k; //pojedyncza ocena float srednia; //średnia ocen int main() { cout << "podaj liczbe ocen" << endl; cin >> n; for (int i = 1; i<= n; i++) //Pętla działa tyle razy ile podajemy ocen { cout << "podaj ocene " <<endl; cin >> k; srednia = srednia + k; } srednia = srednia / n; cout << endl; cout << srednia << 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