Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int n,c,ok=0,m=0,p=1,cifra;
- cin>>n>>c;
- while(n)
- {
- cifra=n%10;
- if(cifra!=c)
- {
- m+=p*cifra;
- p*=10;
- ok=1;
- }
- n=n/10;
- }
- if(ok==1)
- cout<<m;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement