online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> #include <string> int ObliczSzereg_przemek89k(int zakres){ int suma = 0; for(int i = 1; i <= zakres; i++) { for(int x = 1; x <= i; x++) { suma = suma + i; } } return suma; } int ObliczSzereg_fernandez85(int zakres){ int suma = 0, mul = 0; for (int i = 1; i <= zakres; i++) { mul = mul * 10 + 1; suma += i * mul; } return suma; } int main() { std::cout << ObliczSzereg_przemek89k(2) <<"\n"; std::cout << ObliczSzereg_przemek89k(3) <<"\n"; std::cout << ObliczSzereg_przemek89k(5) <<"\n"; std::cout << "======\n"; std::cout << ObliczSzereg_fernandez85(2) <<"\n"; std::cout << ObliczSzereg_fernandez85(3) <<"\n"; std::cout << ObliczSzereg_fernandez85(5) <<"\n"; }

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