online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdbool.h> int main() { int digit; long n; while (true) { bool digit_seen[10] = { false }, flag = false; printf("Enter a number: "); scanf("%ld", &n); int l=1; if (n <= 0) { break; } while(n>0) { digit = n % 10; if (digit_seen[digit]) { l = 0; }digit_seen[digit] = true; n /= 10; } if (l==0) { printf("Repeated digit\n"); } else { printf("No Repeated digit\n"); } } 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