#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;