Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //PROBLEMA 13
- #include<iostream>
- using namespace std;
- void numar(int n, int c1, int c2, int &x)
- { int r=0,k=1; x=0;
- while(n)
- { if (n%10<c1 || n%10>c2)
- {x=n%10*k+x; k=k*10;}
- n=n/10; }
- }
- int main()
- { int n,c1,c2,x;
- cin>>n;
- cin>>c1;
- cin>>c2;
- numar(n,c1,c2,x);
- cout<<x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement