Module: (C++) Loop statement with condition - while

Problem

10
/21

The number of specific digits in the number

Problem

Given a natural number N and the number k. Count the number of times k in number N

Input:
The first line sets the number N (N> 0)
The second line contains the number k (0 <= k <= 9) Output:
It is necessary to print the number of digits k in the number N