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