Write the definition of a subprogram cif that receives through parameter a a natural number with at most 9 digits and through parameter b a digit (0 <= b <= 9). The subprogram returns the number of occurrences of digit b in the base-10 representation of a. For a = 0, the number is considered to have a single digit, 0.
Then write a main program that reads from standard input a non-zero natural number t, then t pairs (a, b) separated by spaces or newlines, and prints on a separate line the value returned by the call cif(a, b) for each pair, in reading order.