online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <cmath> using namespace std; int cD(int n) { int c = 0; for (int i = 1; i <= sqrt(n); ++i) { if (n % i == 0) { c++; if (i != n / i) { c++; } } } return c; } int main() { int num; cout << "Введите натуральное число: "; cin >> num; if (num > 0) { int dC = cD(num); cout << "Количество делителей числа " << num << ": " << dC << endl; } else { 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