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