online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; int main() { int number; double factorial = 1; int k; cout << "Enter the number \t"; cin >> number; if(number>=1) { for(k = 1; k <= number; k += 1) {factorial = factorial*k;} cout << factorial; } else if(number == 0) {factorial = 1; cout << factorial;} else {cout << " enter either 0 or positive integer ";} 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