Digit Check in C


/ Published in: C
Save to your folder(s)

Check that a given integer consists only of elements of a given set. It does a linear search through the set, so the assumption is that the set to search is relatively small. If you're chewing through a particularly large set of digits, you may want to sort your set and implement a binary search.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.