online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> using namespace std; int main() { int num; cout << "Enter a number between 0 - 1000: "; cin >> num; int sum = 0; while (num > 0) { int lastdigit = num % 10; sum = sum + lastdigit; num = num / 10; } cout << "Sum of digits is " << sum << 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