Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int f(int &x) {
- if (x % 2 == 0) {
- x = x / 2;
- }
- else x = 0;
- }
- int main()
- {
- int i;
- cin >> i;
- f(i);
- cout << i;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement