标签:lag break 方法 tps while code == als return
#define _CRT_SECURE_NO_WARNINGSint 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;
标签:lag break 方法 tps while code == als return
原文地址:https://blog.51cto.com/14308074/2421834