#include
using namespace std;
int main ()
{
long long int N;
cin>>N;
int Digit;
cin>>Digit;
int ans =0;
while(N>0)
{
int r=N%10;
if(Digit==r)
{
ans=ans+1;
continue;
}
}
cout<<ans<<endl;
return 0;
}
#include
using namespace std;
int main ()
{
long long int N;
cin>>N;
int Digit;
cin>>Digit;
int ans =0;
while(N>0)
{
int r=N%10;
if(Digit==r)
{
ans=ans+1;
continue;
}
}
cout<<ans<<endl;
return 0;
}
i am not able to share
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.