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