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