you then could use the functions/macros isdigit to validate a position in the user's entry as number.
char buffer[100]
printf("Enter Social Insurance Number: ");
fgets(buffer, sizeof(buffer), stdin);
int iLen = strlen(buffer);
if (iLen != 9) {
puts("9 numbers, only, no delimiters allowed");
exit(0);
}
for (int i = 0; i < 9; i++) {
if (!isdigit(!buffer[i])) {
puts("numbers, only!");
exit(0);
}
}
printf("Congratulation! You entered a correct SIN!\n");
help us by giving the rules.