I cant figure out my error :/ : Okay so, this is probably one of those mistakes that is so simple that its mindblowing. Im not sure what the problem is but the program is meant to receive a number, 1 digit at a time, use that digit as an index for the array to check if its true, if so then break out of the loop and if not, set it to true and continue scanning the other digits til it reaches the last. Its only supposed to tell if a digit was repeated or not at this point. I have this code so far but i cant seem to get it working. Can anyone help me? i noticed while doing my own troubleshooting by testing the value of the variables after execution that sometimes the other digits aren't even read, only the first entered and i dont know why

Heres the code:

    #include <stdio.h>
    #define true 1
    #define false 0
    typedef int bool;

    int main(void)
    {
	// Variables to contain the seen digits
	bool seendig[10] = { false };
	long entered;
	int container;


	printf("This Program Is Designed To Determine If Any Digits Has Been Repeated!\nPlease Enter a Number: ");
	scanf_s("%1d", &entered);

	while (entered > 0)
	{
		container = entered;
		
												if (seendig[container])
												{
													break;
												}

		seendig[container] = true;
		entered /= 10;

	}


	if (entered > 0)
		// then digit is repeated
		printf("\nThe Digit Was Repeated\n\n");
	else
	{
		printf("The Digit Was Not Repeated\n\n");
	}


	system("pause");
	return 0;
    }