Home > Back-end > C language programming topics for help thank you!
C language programming topics for help thank you!
Time:09-22
In view of the present telephone users are often waste the status quo of telephone harassment, launched on the market all kinds of garbage telephone interception software, here try to achieve the function of intercept rubbish phone software part, main implementation calls for judgment, determine whether to intercept the calls, we take the rubbish phone decision rule is: or is in the blacklist or begin with 400, blacklist can be defined as global pointer array, write two custom function, the function of a custom function is whether a numeric string starting with 400, another custom function function is to determine whether a numeric string in the blacklist, the main function is responsible for enter a phone number, and then call the custom function respectively to determine the number, whether to need to be intercepted and output the number of information,
CodePudding user response:
This is clear, to achieve two functions, first determines if the beginning of 400, to judge the first three characters respectively 0, 4, another function is the search function, is to find the number in the blacklist, you can use linked lists to store the blacklist, if simple, can also be an array