Quote:
if(all_digits(to_find) && strlen(to_find) == 13)
The above check just validates the input
format.
Now you have to check whether the entered 'ID card number' is in the file.
I suggest you to write a function for searching inside the file (just move your search code from
main
to a function and return the outcome). Then, based on the function return value, your code could show the proper message to the user.