Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,k;
- cin>>n>>k;
- bool exista=false;
- int p=1;
- while(n)
- {
- if(n%10!=k)
- p*=n%10,exista=true;
- n/=10;
- }
- if(exista)
- cout<<p;
- else
- cout<<0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement