online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int accept_number(){ int x; cin >> x; return x; } bool ispositive(int x){ if (x > 0) return true; else return false; } int product(int& x, int& y){ return (x*y); } void display (int a){ cout << "The product is " << a << "."; } int main(){ int userNum, total = 1; do { cout << "Enter a number: "; userNum = accept_number(); std::cout<<"userNum: "<<userNum<<std::endl; total*= userNum; std::cout<<"total: "<<total<<std::endl; } while (ispositive(userNum)); cout << endl; display(total); cout << 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