Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int calcul(int n, int &x)
- {
- while(n)
- {
- int p=1, x=0;
- if((n%10)%2==0)
- {
- x=x+(n%10)*p;
- p=p*10;
- }
- n=n/10;
- }
- }
- int main()
- {
- int x;
- calcul(9278,x);
- cout<<x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement